From: Mike Blumenkrantz Date: Wed, 3 Jun 2020 15:13:35 +0000 (-0400) Subject: zink: destroy descriptor pools on context destroy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ff2d195b04f6d258d7d804590ad83946af1de8a;p=mesa.git zink: destroy descriptor pools on context destroy this is a big leak Reviewed-by: Antonio Caggiano Reviewed-by: Erik Faye-Lund Part-of: --- 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);