radeonsi: lower IO only if io_lowered == false

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
This commit is contained in:
Marek Olšák 2024-12-24 13:54:33 -05:00 committed by Marge Bot
parent 53ae218dcd
commit c662fcfa94

View file

@ -419,8 +419,14 @@ char *si_finalize_nir(struct pipe_screen *screen, struct nir_shader *nir)
{
struct si_screen *sscreen = (struct si_screen *)screen;
nir_lower_io_passes(nir, false);
NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_shader_in | nir_var_shader_out, NULL);
if (nir->info.io_lowered) {
nir_foreach_variable_with_modes(var, nir, nir_var_shader_in | nir_var_shader_out) {
unreachable("no IO variables should be present with lowered IO");
}
} else {
nir_lower_io_passes(nir, false);
NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_shader_in | nir_var_shader_out, NULL);
}
if (nir->info.stage == MESA_SHADER_FRAGMENT)
NIR_PASS_V(nir, nir_lower_color_inputs);