zink: wait for idle on context-destroy
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 26 Mar 2019 19:33:35 +0000 (20:33 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:44 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_context.c

index 1d6282eed1338f1573a235c924163ecfe6474f08..6da1bc6129628e2db97e6e6810e675b238169be0 100644 (file)
@@ -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);