From 23a1dca8c68ed87029da8bf56ae0d9a91cdb3a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 10 Jul 2022 15:28:38 -0400 Subject: [PATCH] radeonsi/gfx11: set SAMPLE_MASK_TRACKER_WATERMARK = 15 and clean up Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pipe.h | 1 - src/gallium/drivers/radeonsi/si_state.c | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index f1cdd968e0e..dc87a831279 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -770,7 +770,6 @@ struct si_framebuffer { ubyte color_is_int8; ubyte color_is_int10; ubyte dirty_cbufs; - ubyte dcc_overwrite_combiner_watermark; ubyte min_bytes_per_pixel; bool dirty_zsbuf; bool any_dst_linear; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index a87e6a48cc6..ca4cc0c8512 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -110,17 +110,16 @@ static void si_emit_cb_render_state(struct si_context *sctx) */ bool oc_disable = blend->dcc_msaa_corruption_4bit & cb_target_mask && sctx->framebuffer.nr_samples >= 2; - unsigned watermark = sctx->framebuffer.dcc_overwrite_combiner_watermark; if (sctx->gfx_level >= GFX11) { radeon_opt_set_context_reg(sctx, R_028424_CB_FDCC_CONTROL, SI_TRACKED_CB_DCC_CONTROL, S_028424_SAMPLE_MASK_TRACKER_DISABLE(oc_disable) | - S_028424_SAMPLE_MASK_TRACKER_WATERMARK(watermark)); + S_028424_SAMPLE_MASK_TRACKER_WATERMARK(15)); } else { radeon_opt_set_context_reg( sctx, R_028424_CB_DCC_CONTROL, SI_TRACKED_CB_DCC_CONTROL, S_028424_OVERWRITE_COMBINER_MRT_SHARING_DISABLE(sctx->gfx_level <= GFX9) | - S_028424_OVERWRITE_COMBINER_WATERMARK(watermark) | + S_028424_OVERWRITE_COMBINER_WATERMARK(sctx->gfx_level >= GFX10 ? 6 : 4) | S_028424_OVERWRITE_COMBINER_DISABLE(oc_disable) | S_028424_DISABLE_CONSTANT_ENCODE_REG(sctx->gfx_level < GFX11 && sctx->screen->info.has_dcc_constant_encode)); @@ -3088,12 +3087,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx, sctx->framebuffer.min_bytes_per_pixel = tex->surface.bpe; } - /* For optimal DCC performance. */ - if (sctx->gfx_level >= GFX10) - sctx->framebuffer.dcc_overwrite_combiner_watermark = 6; - else - sctx->framebuffer.dcc_overwrite_combiner_watermark = 4; - struct si_texture *zstex = NULL; if (state->zsbuf) {