From 8529c64fb7d5e83b3dffe46b7019dfdeacc2088c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 27 Jul 2021 14:18:46 -0400 Subject: [PATCH] zink: fix lazy descriptor deinit this used to be the right conditional, but it's not anymore Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_descriptors_lazy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_descriptors_lazy.c b/src/gallium/drivers/zink/zink_descriptors_lazy.c index fde735c4917..14dfd1ec7a3 100644 --- a/src/gallium/drivers/zink/zink_descriptors_lazy.c +++ b/src/gallium/drivers/zink/zink_descriptors_lazy.c @@ -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); }