nak: Unconditionally call lower_io_to_temporaries in preprocess_nir

We're calling it for fragment shaders and NVK is calling it for
eerything before invoking NAK so we may as well call it unconditionally
in NAK and skip calling it in NVK.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
This commit is contained in:
Faith Ekstrand 2025-05-28 11:28:59 -04:00 committed by Marge Bot
parent f70d0425c8
commit ac45243ec1
2 changed files with 3 additions and 7 deletions

View file

@ -299,10 +299,9 @@ nak_preprocess_nir(nir_shader *nir, const struct nak_compiler *nak)
nir_validate_ssa_dominance(nir, "before nak_preprocess_nir");
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
nir_lower_io_to_temporaries(nir, nir_shader_get_entrypoint(nir),
true /* outputs */, false /* inputs */);
}
OPT(nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir),
true /* outputs */, false /* inputs */);
const nir_lower_tex_options tex_options = {
.lower_txd_3d = true,

View file

@ -136,9 +136,6 @@ nvk_preprocess_nir(struct vk_physical_device *vk_pdev,
const struct nvk_physical_device *pdev =
container_of(vk_pdev, struct nvk_physical_device, vk);
NIR_PASS(_, nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir), true, false);
nak_preprocess_nir(nir, pdev->nak);
}