summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-03-26 20:33:35 +0100
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:44 +0000
commit453d9f193aa2e59ae13e8d670ed2bac8f2d45b67 (patch)
treee6767a2b3904d7a3554c5bef1e1cb943696abe09 /src/gallium/drivers/zink
parent8541b58e39a2f9d7c2231a2bc60a357d998a4d3e (diff)
zink: wait for idle on context-destroy
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/zink')
-rw-r--r--src/gallium/drivers/zink/zink_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 1d6282eed13..6da1bc61296 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -54,6 +54,10 @@ zink_context_destroy(struct pipe_context *pctx)
{
struct zink_context *ctx = zink_context(pctx);
struct zink_screen *screen = zink_screen(pctx->screen);
+
+ if (vkQueueWaitIdle(ctx->queue) != VK_SUCCESS)
+ debug_printf("vkQueueWaitIdle failed\n");
+
for (int i = 0; i < ARRAY_SIZE(ctx->cmdbufs); ++i)
vkFreeCommandBuffers(screen->dev, ctx->cmdpool, 1, &ctx->cmdbufs[i].cmdbuf);
vkDestroyCommandPool(screen->dev, ctx->cmdpool, NULL);