VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2;
img_fmt_info.pNext = props->need_export ? &ext_img_fmt_info : 0;
img_fmt_info.format = props->format;
- img_fmt_info.type = get_image_type(props->h, props->depth);
+ img_fmt_info.type = VK_IMAGE_TYPE_2D;
img_fmt_info.tiling = props->tiling;
for (i = 0; i < ARRAY_SIZE(all_flags); i++) {
/* usage can't be null */
if (flags) {
img_fmt_info.usage = flags;
- }
- else {
+ } else {
if (!props->is_swapchain) {
fprintf(stderr, "Unsupported Vulkan format properties: usage.\n");
return false;
static bool
sc_validate_surface(struct vk_ctx *ctx,
- VkSurfaceKHR surf)
+ VkSurfaceKHR surf)
{
VkBool32 supported;
if (!surf) {
}
memset(swapchain, 0, sizeof *swapchain);
- swapchain->surface = surf;
memset(&s_info, 0, sizeof s_info);
s_info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
struct vk_swapchain *swapchain)
{
vkDestroySwapchainKHR(ctx->dev, swapchain->swapchain, 0);
- vkDestroySurfaceKHR(ctx->inst, swapchain->surface, 0);
-
- free(swapchain);
swapchain = 0;
}