Module: Mesa
Branch: master
Commit: 2b18105ff752945bbfbb8504e8e5a2704e2510d8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b18105ff752945bbfbb8504e8e5a2704e2510d8

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Oct 13 10:12:40 2020 -0400

zink: add some asserts for pipeline barriers to check renderpass state

it's illegal to emit barriers during a renderpass

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543>

---

 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,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to