diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 0a19949ad82..94ff2389243 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -272,7 +272,8 @@ st_nir_opts(nir_shader *nir) NIR_PASS(progress, nir, nir_opt_dead_write_vars); if (nir->options->lower_to_scalar) { - NIR_PASS_V(nir, nir_lower_alu_to_scalar, NULL, NULL); + NIR_PASS_V(nir, nir_lower_alu_to_scalar, + nir->options->lower_to_scalar_filter, NULL); NIR_PASS_V(nir, nir_lower_phis_to_scalar); } @@ -403,7 +404,8 @@ st_nir_preprocess(struct st_context *st, struct gl_program *prog, NIR_PASS_V(nir, nir_lower_var_copies); if (options->lower_to_scalar) { - NIR_PASS_V(nir, nir_lower_alu_to_scalar, NULL, NULL); + NIR_PASS_V(nir, nir_lower_alu_to_scalar, + options->lower_to_scalar_filter, NULL); } /* before buffers and vars_to_ssa */