From d406dbbde953922182e40818961d6d0ce7de1b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Thu, 14 Nov 2024 20:20:37 +0100 Subject: [PATCH] r300: run nir_opt_algebraic in the backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No effect in shader-db right now, but without it the next commit leads to small regression in instruction numbers (0.03%) instead of the small win we have now (-0.05%). Signed-off-by: Pavel Ondračka Reviewed-by: Filip Gawin Part-of: --- src/gallium/drivers/r300/compiler/nir_to_rc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/nir_to_rc.c b/src/gallium/drivers/r300/compiler/nir_to_rc.c index 3f7eb12ef9e..b3de9a3253c 100644 --- a/src/gallium/drivers/r300/compiler/nir_to_rc.c +++ b/src/gallium/drivers/r300/compiler/nir_to_rc.c @@ -2278,8 +2278,11 @@ nir_to_rc(struct nir_shader *s, struct pipe_screen *screen) NIR_PASS_V(s, nir_to_rc_lower_tex); bool progress; - - NIR_PASS_V(s, nir_opt_constant_folding); + do { + progress = false; + NIR_PASS(progress, s, nir_opt_algebraic); + NIR_PASS(progress, s, nir_opt_constant_folding); + } while (progress); do { progress = false;