brw: run opt_deref only once

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39513>
This commit is contained in:
Alyssa Rosenzweig 2025-11-12 14:13:40 -05:00 committed by Caio Oliveira
parent 73fa431bff
commit 99d22bc35e

View file

@ -1395,7 +1395,6 @@ brw_nir_optimize(nir_shader *nir,
if (nir->info.stage != MESA_SHADER_KERNEL)
LOOP_OPT(nir_split_array_vars, nir_var_function_temp);
LOOP_OPT(nir_shrink_vec_array_vars, nir_var_function_temp);
LOOP_OPT(nir_opt_deref);
LOOP_OPT(nir_lower_vars_to_ssa);
if (!nir->info.var_copies_lowered) {
/* Only run this pass if nir_lower_var_copies was not called
@ -1687,6 +1686,8 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
brw_nir_optimize(nir, devinfo);
OPT(nir_opt_deref);
unsigned lower_flrp =
(nir->options->lower_flrp16 ? 16 : 0) |
(nir->options->lower_flrp32 ? 32 : 0) |