Module: Mesa Branch: staging/23.0 Commit: 039a200e43d45ac043607e9a6a0da0bab2757dbf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=039a200e43d45ac043607e9a6a0da0bab2757dbf
Author: Sidney Just <[email protected]> Date: Wed Jan 25 14:14:44 2023 -0800 zink: Fix non debug builds failing to compile on Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20917> (cherry picked from commit 6c80f7c555250678738a8313935680dab13be2b2) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 2 +- src/gallium/drivers/zink/zink_render_pass.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b7ac7dfab2d..b0651e6bec9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4396,7 +4396,7 @@ "description": "zink: Fix non debug builds failing to compile on", "nominated": false, "nomination_type": null, - "resolution": 4, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 2904e3e0b19..43bdfffd4b6 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2512,7 +2512,7 @@ begin_rendering(struct zink_context *ctx) ctx->dynamic_fb.attachments[i].imageView = iv; } if (has_swapchain) { - struct zink_resource *res = zink_resource(ctx->fb_state.cbufs[0]->texture); + ASSERTED struct zink_resource *res = zink_resource(ctx->fb_state.cbufs[0]->texture); zink_render_fixup_swapchain(ctx); assert(ctx->dynamic_fb.info.renderArea.extent.width <= res->base.b.width0); assert(ctx->dynamic_fb.info.renderArea.extent.height <= res->base.b.height0); diff --git a/src/gallium/drivers/zink/zink_render_pass.c b/src/gallium/drivers/zink/zink_render_pass.c index 91629fa4e2d..1e95329f625 100644 --- a/src/gallium/drivers/zink/zink_render_pass.c +++ b/src/gallium/drivers/zink/zink_render_pass.c @@ -642,7 +642,6 @@ begin_render_pass(struct zink_context *ctx) { struct zink_batch *batch = &ctx->batch; struct pipe_framebuffer_state *fb_state = &ctx->fb_state; - bool zsbuf_used = ctx->fb_state.zsbuf && zink_is_zsbuf_used(ctx); VkRenderPassBeginInfo rpbi = {0}; rpbi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; @@ -707,6 +706,7 @@ begin_render_pass(struct zink_context *ctx) /* this can be set if fbfetch is activated */ ctx->rp_changed = false; #ifndef NDEBUG + bool zsbuf_used = ctx->fb_state.zsbuf && zink_is_zsbuf_used(ctx); const unsigned cresolve_offset = ctx->fb_state.nr_cbufs + !!zsbuf_used; for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) { if (ctx->fb_state.cbufs[i]) {
