Mesa (master): zink: destroy blitter before destroying batches
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 5 15:41:15 UTC 2021
Module: Mesa
Branch: master
Commit: 5d44a973b537515b0f853f54bec9925705badba1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d44a973b537515b0f853f54bec9925705badba1
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue Dec 15 10:35:32 2020 +0100
zink: destroy blitter before destroying batches
Destroying the blitter frees samplers, which pushes the sampler-handles
onto the batches' zombie-sampler lists. So if we want to properly clean
these zombie-samplers up, we need to first get them onto the list so
we'll know about them in time.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099>
---
src/gallium/drivers/zink/zink_context.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 20521d59e92..52bfd970c9f 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -59,6 +59,8 @@ zink_context_destroy(struct pipe_context *pctx)
if (vkQueueWaitIdle(ctx->queue) != VK_SUCCESS)
debug_printf("vkQueueWaitIdle failed\n");
+ util_blitter_destroy(ctx->blitter);
+
for (unsigned i = 0; i < ARRAY_SIZE(ctx->null_buffers); i++)
pipe_resource_reference(&ctx->null_buffers[i], NULL);
@@ -71,7 +73,6 @@ zink_context_destroy(struct pipe_context *pctx)
util_primconvert_destroy(ctx->primconvert);
u_upload_destroy(pctx->stream_uploader);
slab_destroy_child(&ctx->transfer_pool);
- util_blitter_destroy(ctx->blitter);
FREE(ctx);
}
More information about the mesa-commit
mailing list