From 98340dc8c40d3bb2dbe47eac5fcdf3d65bba87a4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 30 Aug 2023 06:54:37 -0400 Subject: [PATCH] zink: be more precise about flagging rp changes around unordered u_blitter failing to update rp attachments as needed after unordered blits results in broken (depth) rendering Fixes: 3a9f7d70383 ("zink: implement unordered u_blitter calls") Part-of: --- src/gallium/drivers/zink/zink_blit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index 390a2fa..e471ff0 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -407,6 +407,7 @@ zink_blit(struct pipe_context *pctx, bool in_rp = ctx->batch.in_rp; uint64_t tc_data = ctx->dynamic_fb.tc_info.data; bool queries_disabled = ctx->queries_disabled; + bool rp_changed = ctx->rp_changed || (!ctx->fb_state.zsbuf && util_format_is_depth_or_stencil(info->dst.format)); unsigned ds3_states = ctx->ds3_states; if (ctx->unordered_blitting) { /* for unordered blit, swap the unordered cmdbuf for the main one for the whole op to avoid conditional hell */ @@ -456,7 +457,7 @@ zink_blit(struct pipe_context *pctx, zink_batch_no_rp(ctx); ctx->batch.in_rp = in_rp; ctx->gfx_pipeline_state.rp_state = zink_update_rendering_info(ctx); - ctx->rp_changed = false; + ctx->rp_changed = rp_changed; ctx->queries_disabled = queries_disabled; ctx->dynamic_fb.tc_info.data = tc_data; ctx->batch.state->cmdbuf = cmdbuf; -- 2.7.4