changed depth format for the program to run on amd
[vkrt] / src / vk.c
index 9e80dd3..480b6b8 100644 (file)
--- a/src/vk.c
+++ b/src/vk.c
@@ -1033,8 +1033,7 @@ are_props_supported(struct vk_ctx *ctx, struct vk_att_props *props)
     /* 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;
@@ -1064,7 +1063,7 @@ are_props_supported(struct vk_ctx *ctx, struct vk_att_props *props)
 
 static bool
 sc_validate_surface(struct vk_ctx *ctx,
-                 VkSurfaceKHR surf)
+                    VkSurfaceKHR surf)
 {
     VkBool32 supported;
     if (!surf) {
@@ -2037,7 +2036,6 @@ vk_create_swapchain(struct vk_ctx *ctx,
     }
 
     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;
@@ -2157,9 +2155,6 @@ vk_destroy_swapchain(struct vk_ctx *ctx,
                      struct vk_swapchain *swapchain)
 {
     vkDestroySwapchainKHR(ctx->dev, swapchain->swapchain, 0);
-    vkDestroySurfaceKHR(ctx->inst, swapchain->surface, 0);
-
-    free(swapchain);
     swapchain = 0;
 }