From 2bf839f0aea744fa3b42a296cc97c2dd31a8d59f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 19 May 2023 02:23:50 -0400 Subject: [PATCH] radeonsi/gfx11: extend DB_Z_INFO.NUM_SAMPLES programming to > GFX11 Reviewed-by: Qiang Yu Part-of: --- src/gallium/drivers/radeonsi/si_state.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 62be99b..16b885a 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3512,11 +3512,12 @@ static void si_emit_framebuffer_state(struct si_context *sctx) else radeon_set_context_reg_seq(R_028040_DB_Z_INFO, 2); - /* Gfx11 only: DB_Z_INFO.NUM_SAMPLES should always match the framebuffer samples. - * It affects VRS and occlusion queries if depth and stencil are not bound. + /* Gfx11+: DB_Z_INFO.NUM_SAMPLES should match the framebuffer samples if no Z/S is bound. + * It determines the sample count for VRS, primitive-ordered pixel shading, and occlusion + * queries. */ radeon_emit(S_028040_FORMAT(V_028040_Z_INVALID) | /* DB_Z_INFO */ - S_028040_NUM_SAMPLES(sctx->gfx_level == GFX11 ? sctx->framebuffer.log_samples : 0)); + S_028040_NUM_SAMPLES(sctx->gfx_level >= GFX11 ? sctx->framebuffer.log_samples : 0)); radeon_emit(S_028044_FORMAT(V_028044_STENCIL_INVALID)); /* DB_STENCIL_INFO */ } -- 2.7.4