From 9dbd3437c6628f7f3440fd90bc0f61cd6e6875bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 31 Dec 2023 23:11:39 -0500 Subject: [PATCH] radeonsi: remove no-op additions for viewport0_y_inverted adding the same value to both sides of the equation has no effect Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_viewport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_viewport.c b/src/gallium/drivers/radeonsi/si_state_viewport.c index 47135621233..15e05d7dfcd 100644 --- a/src/gallium/drivers/radeonsi/si_state_viewport.c +++ b/src/gallium/drivers/radeonsi/si_state_viewport.c @@ -477,8 +477,7 @@ static void si_set_viewport_states(struct pipe_context *pctx, unsigned start_slo } if (start_slot == 0) { - ctx->viewport0_y_inverted = - -state->scale[1] + state->translate[1] > state->scale[1] + state->translate[1]; + ctx->viewport0_y_inverted = state->scale[1] < 0; /* NGG cull state uses the viewport and quant mode. */ if (ctx->screen->use_ngg_culling)