Module: Mesa
Branch: main
Commit: a858bcbb37ef00708be66f7c4728945b99776b5a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a858bcbb37ef00708be66f7c4728945b99776b5a

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Mar  8 18:37:53 2023 -0500

zink: add an assert to catch renderpass optimizing bugs

this should only trigger if tc has a bug

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800>

---

 src/gallium/drivers/zink/zink_clear.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_clear.c 
b/src/gallium/drivers/zink/zink_clear.c
index 826ad3d83b1..8d675777cbe 100644
--- a/src/gallium/drivers/zink/zink_clear.c
+++ b/src/gallium/drivers/zink/zink_clear.c
@@ -80,6 +80,8 @@ clear_in_rp(struct pipe_context *pctx,
       if (buffers & PIPE_CLEAR_STENCIL)
          aspect |= VK_IMAGE_ASPECT_STENCIL_BIT;
 
+      assert(zink_is_zsbuf_used(ctx));
+
       attachments[num_attachments].aspectMask = aspect;
       attachments[num_attachments].clearValue.depthStencil.depth = depth;
       attachments[num_attachments].clearValue.depthStencil.stencil = stencil;

Reply via email to