mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
glsl: simplify nir_lower_io_to_temporaries logic
no change in behavior Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
This commit is contained in:
parent
b7c4a1479e
commit
f29530533c
1 changed files with 5 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue