From 2b18105ff752945bbfbb8504e8e5a2704e2510d8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 13 Oct 2020 10:12:40 -0400 Subject: [PATCH] zink: add some asserts for pipeline barriers to check renderpass state it's illegal to emit barriers during a renderpass Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 5ec0505e36b..6a9eec8f304 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1445,6 +1445,7 @@ zink_resource_image_barrier(struct zink_context *ctx, struct zink_batch *batch, else batch = zink_batch_no_rp(ctx); } + assert(!batch->in_rp); VkImageSubresourceRange isr = { res->aspect, 0, VK_REMAINING_MIP_LEVELS, @@ -1542,6 +1543,7 @@ zink_resource_buffer_barrier(struct zink_context *ctx, struct zink_batch *batch, else batch = zink_batch_no_rp(ctx); } + assert(!batch->in_rp); VkBufferMemoryBarrier bmb = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, NULL,