diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index cb88c50ffa6..760b661f5ba 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -955,10 +955,6 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, OPT(nir_lower_bit_size, lower_bit_size_callback, (void *)compiler); - if (is_scalar) { - OPT(nir_lower_load_const_to_scalar); - } - /* Lower a bunch of stuff */ OPT(nir_lower_var_copies); @@ -969,6 +965,10 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, OPT(nir_opt_large_constants, NULL, 32); } + if (is_scalar) { + OPT(nir_lower_load_const_to_scalar); + } + OPT(nir_lower_system_values); OPT(nir_lower_compute_system_values, NULL);