zink: fix lazy descriptor deinit
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 27 Jul 2021 18:18:46 +0000 (14:18 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Aug 2021 19:45:29 +0000 (19:45 +0000)
this used to be the right conditional, but it's not anymore

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

src/gallium/drivers/zink/zink_descriptors_lazy.c

index fde735c491790073d54b76aaa687b45c84c8cb57..14dfd1ec7a3d5c4a2bb9d72e2561ea259340fca4 100644 (file)
@@ -668,11 +668,10 @@ zink_descriptors_deinit_lazy(struct zink_context *ctx)
       struct zink_screen *screen = zink_screen(ctx->base.screen);
       if (ctx->dd->dummy_pool)
          vkDestroyDescriptorPool(screen->dev, ctx->dd->dummy_pool, NULL);
-      if (screen->descriptor_mode == ZINK_DESCRIPTOR_MODE_LAZY &&
-          screen->info.have_KHR_push_descriptor) {
+      if (ctx->dd->push_dsl[0])
          vkDestroyDescriptorSetLayout(screen->dev, ctx->dd->push_dsl[0]->layout, NULL);
+      if (ctx->dd->push_dsl[1])
          vkDestroyDescriptorSetLayout(screen->dev, ctx->dd->push_dsl[1]->layout, NULL);
-      }
    }
    ralloc_free(ctx->dd);
 }