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

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 17 18:29:53 2023 -0400

zink: add some asserts for zs layout in dynamic render

assert all the things

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

---

 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 925f6dc217d..fb9a6f545ea 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -2691,8 +2691,10 @@ begin_rendering(struct zink_context *ctx)
       VkImageView iv = zink_prep_fb_attachment(ctx, surf, 
ctx->fb_state.nr_cbufs);
       ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].imageView = iv;
       ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].imageLayout = 
zink_resource(surf->base.texture)->layout;
+      assert(ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].imageLayout != 
VK_IMAGE_LAYOUT_UNDEFINED);
       ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageView = iv;
       ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout = 
zink_resource(surf->base.texture)->layout;
+      assert(ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout != 
VK_IMAGE_LAYOUT_UNDEFINED);
    }
    assert(ctx->fb_state.width >= ctx->dynamic_fb.info.renderArea.extent.width);
    assert(ctx->fb_state.height >= 
ctx->dynamic_fb.info.renderArea.extent.height);

Reply via email to