From b60acfc5fb1f298d30520ea6266c2891c70d771c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 19 Mar 2026 21:14:43 -0400 Subject: [PATCH] radeonsi: don't recompute IO bases for FS outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are unused now. Acked-by: Pierre-Eric Reviewed-by: Timur Kristóf Part-of: --- src/gallium/drivers/radeonsi/si_shader_nir.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index d2f7f82ac94..87549949736 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -111,16 +111,11 @@ void si_finalize_nir(struct pipe_screen *screen, struct nir_shader *nir, bool optimize) { struct si_screen *sscreen = (struct si_screen *)screen; - nir_variable_mode recompute_io_bases = 0; if (nir->info.io_lowered) { nir_foreach_variable_with_modes(var, nir, nir_var_shader_in | nir_var_shader_out) { UNREACHABLE("no IO variables should be present with lowered IO"); } - - /* Not all places recompute FS input bases, but we need them to be up to date. */ - if (nir->info.stage == MESA_SHADER_FRAGMENT) - recompute_io_bases = nir_var_shader_in | nir_var_shader_out; } else { /* This always recomputes FS output bases. */ nir_lower_io_passes(nir, false); @@ -147,8 +142,8 @@ void si_finalize_nir(struct pipe_screen *screen, struct nir_shader *nir, NIR_PASS_ASSERT_NO_PROGRESS(nir, nir_opt_intrinsics); NIR_PASS_ASSERT_NO_PROGRESS(nir, nir_lower_system_values); - if (recompute_io_bases) - NIR_PASS(_, nir, nir_recompute_io_bases, recompute_io_bases); + if (nir->info.stage == MESA_SHADER_FRAGMENT) + NIR_PASS(_, nir, nir_recompute_io_bases, nir_var_shader_in); /* Remove uniforms because those should have been lowered to UBOs already. */ nir_foreach_variable_with_modes_safe(var, nir, nir_var_uniform) {