From e20a43ec3545f50705d16ace70145fa7b32dd19b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 12 Aug 2020 16:56:35 -0400 Subject: [PATCH] zink: handle memory barriers for compute batch this is a bit different since the regular functions cycle the gfx batch array, but the compute batch isn't in an array Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/gallium/drivers/zink/zink_context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 236b9fce2e0..6ab9c6f222b 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1417,6 +1417,13 @@ zink_memory_barrier(struct pipe_context *pctx, unsigned flags) vkCmdPipelineBarrier(batch->cmdbuf, src, dst, 0, 0, &b, 0, NULL, 0, NULL); flush_batch(ctx); } + batch = &ctx->compute_batch; + if (batch->has_draw) { + /* this should be the only call needed */ + vkCmdPipelineBarrier(batch->cmdbuf, src, dst, 0, 0, &b, 0, NULL, 0, NULL); + zink_end_batch(ctx, batch); + zink_start_batch(ctx, batch); + } } static void