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 <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781>
This commit is contained in:
Mike Blumenkrantz 2020-08-12 16:56:35 -04:00 committed by Marge Bot
parent e3633ed12b
commit e20a43ec35

View file

@ -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