From 6bba7b685ed3476282b898d57d9a910a820a5313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 5 Aug 2024 18:55:05 -0400 Subject: [PATCH] radeonsi: strengthen the condition determining OREO_MODE No change in behavior. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 0ea0025b958..428032e01f0 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1795,14 +1795,14 @@ static void si_emit_db_render_state(struct si_context *sctx, unsigned index) /* This ignores CONSERVATIVE_Z_EXPORT, so it's slightly pessimistic. */ bool late_z = !G_02880C_DEPTH_BEFORE_SHADER(sctx->ps_db_shader_control) && (G_02880C_Z_ORDER(sctx->ps_db_shader_control) == V_02880C_LATE_Z || - (G_02880C_Z_ORDER(sctx->ps_db_shader_control) == V_02880C_EARLY_Z_THEN_LATE_Z && - (G_02880C_KILL_ENABLE(sctx->ps_db_shader_control) || - G_02880C_Z_EXPORT_ENABLE(sctx->ps_db_shader_control) || - G_02880C_STENCIL_TEST_VAL_EXPORT_ENABLE(sctx->ps_db_shader_control) || - G_02880C_STENCIL_OP_VAL_EXPORT_ENABLE(sctx->ps_db_shader_control) || - G_02880C_COVERAGE_TO_MASK_ENABLE(sctx->ps_db_shader_control) || - G_02880C_MASK_EXPORT_ENABLE(sctx->ps_db_shader_control) || - sctx->queued.named.blend->alpha_to_coverage))); + /* Late Z is always used in these cases: */ + G_02880C_KILL_ENABLE(sctx->ps_db_shader_control) || + G_02880C_Z_EXPORT_ENABLE(sctx->ps_db_shader_control) || + G_02880C_STENCIL_TEST_VAL_EXPORT_ENABLE(sctx->ps_db_shader_control) || + G_02880C_STENCIL_OP_VAL_EXPORT_ENABLE(sctx->ps_db_shader_control) || + G_02880C_COVERAGE_TO_MASK_ENABLE(sctx->ps_db_shader_control) || + G_02880C_MASK_EXPORT_ENABLE(sctx->ps_db_shader_control) || + sctx->queued.named.blend->alpha_to_coverage); db_render_control |= S_028000_OREO_MODE(late_z ? V_028000_OMODE_BLEND : V_028000_OMODE_O_THEN_B); }