From 1ff2d195b04f6d258d7d804590ad83946af1de8a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 3 Jun 2020 11:13:35 -0400 Subject: zink: destroy descriptor pools on context destroy this is a big leak Reviewed-by: Antonio Caggiano Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index a9cbd929e4a..792027ceb93 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -61,8 +61,10 @@ zink_context_destroy(struct pipe_context *pctx) for (unsigned i = 0; i < ARRAY_SIZE(ctx->null_buffers); i++) pipe_resource_reference(&ctx->null_buffers[i], NULL); - for (int i = 0; i < ARRAY_SIZE(ctx->batches); ++i) + for (int i = 0; i < ARRAY_SIZE(ctx->batches); ++i) { + vkDestroyDescriptorPool(screen->dev, ctx->batches[i].descpool, NULL); vkFreeCommandBuffers(screen->dev, ctx->cmdpool, 1, &ctx->batches[i].cmdbuf); + } vkDestroyCommandPool(screen->dev, ctx->cmdpool, NULL); util_primconvert_destroy(ctx->primconvert); -- cgit v1.2.3