zink: release batch memory

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099>
This commit is contained in:
Erik Faye-Lund 2020-12-15 10:38:07 +01:00 committed by Marge Bot
parent 5d44a973b5
commit f70490bf42
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,8 @@ zink_context_destroy(struct pipe_context *pctx)
pipe_resource_reference(&ctx->null_buffers[i], NULL);
for (int i = 0; i < ARRAY_SIZE(ctx->batches); ++i) {
zink_batch_release(screen, &ctx->batches[i]);
util_dynarray_fini(&ctx->batches[i].zombie_samplers);
vkDestroyDescriptorPool(screen->dev, ctx->batches[i].descpool, NULL);
vkFreeCommandBuffers(screen->dev, ctx->cmdpool, 1, &ctx->batches[i].cmdbuf);
}