diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index ec97c61e8c9..d8ab7b3b317 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -1314,18 +1314,11 @@ preprocess_shader(const struct gl_constants *consts, (nir->info.outputs_written & (VARYING_BIT_CLIP_DIST0 | VARYING_BIT_CLIP_DIST1))) NIR_PASS(_, nir, gl_nir_zero_initialize_clip_distance); - if (options->lower_all_io_to_temps || - nir->info.stage == MESA_SHADER_VERTEX || - nir->info.stage == MESA_SHADER_GEOMETRY) { - NIR_PASS(_, nir, nir_lower_io_to_temporaries, - nir_shader_get_entrypoint(nir), - true, true); - } else if (nir->info.stage == MESA_SHADER_TESS_EVAL || - nir->info.stage == MESA_SHADER_FRAGMENT) { - NIR_PASS(_, nir, nir_lower_io_to_temporaries, - nir_shader_get_entrypoint(nir), - true, false); - } + NIR_PASS(_, nir, nir_lower_io_to_temporaries, + nir_shader_get_entrypoint(nir), true, + options->lower_all_io_to_temps || + nir->info.stage == MESA_SHADER_VERTEX || + nir->info.stage == MESA_SHADER_GEOMETRY); NIR_PASS(_, nir, nir_lower_global_vars_to_local); NIR_PASS(_, nir, nir_split_var_copies);