From df846640322ef212c67ba2d045ed66c1f91aba83 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 14 Apr 2022 09:02:28 -0400 Subject: [PATCH] zink: use mixed zs renderpass for depth read/write this is triggered by u_blitter when doing src==dst blits Fixes: 7781a75229d ("zink: add a renderpass flag for mixed zs layout") affects: GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality* Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 9409756ee36c87de388dd5cb3a2455b4c8be94bf) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 596a45e1dff..7cadd71f24b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1165,7 +1165,7 @@ "description": "zink: use mixed zs renderpass for depth read/write", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7781a75229d5d071fdeb75b9932cc52c37b28552" }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index bd0f02677f5..79d2ded9645 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2075,7 +2075,11 @@ get_render_pass(struct zink_context *ctx) bool needs_write_s = state.rts[fb->nr_cbufs].clear_stencil || outputs_written & BITFIELD64_BIT(FRAG_RESULT_STENCIL); if (!needs_write_z && (!ctx->dsa_state || !ctx->dsa_state->base.depth_enabled)) + /* depth sample, stencil write */ state.rts[fb->nr_cbufs].mixed_zs = needs_write_s && zsbuf->bind_count[0]; + else + /* depth write + sample */ + state.rts[fb->nr_cbufs].mixed_zs = needs_write_z && zsbuf->bind_count[0]; state.rts[fb->nr_cbufs].needs_write = needs_write_z | needs_write_s; state.num_rts++; }