zink: add an assert to catch renderpass optimizing bugs
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 8 Mar 2023 23:37:53 +0000 (18:37 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 17 Mar 2023 14:37:59 +0000 (14:37 +0000)
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

index 826ad3d..8d67577 100644 (file)
@@ -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;