pan/bi: lower phis to scalar early

This is a partial revert of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821/diffs?commit_id=2bd282a9680f6a53bff70f54e60b1c10aefce97a

We need to run `nir_lower_phis_to_scalar` early to make sure
`nir_opt_remove_phis` can do its work before other passes make it too
complicated to optimise with the existing passes.

More information here:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821#note_3262002

Review-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Review-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39918>
This commit is contained in:
Romaric Jodin 2026-02-16 17:28:39 +01:00 committed by Marge Bot
parent 0d7117f0d7
commit 2c5af51f98

View file

@ -6406,6 +6406,7 @@ bifrost_postprocess_nir(nir_shader *nir, unsigned gpu_id)
NIR_PASS(_, nir, nir_lower_alu_width, bi_vectorize_filter, &gpu_id);
NIR_PASS(_, nir, nir_lower_load_const_to_scalar);
NIR_PASS(_, nir, nir_lower_phis_to_scalar, bi_vectorize_filter, &gpu_id);
NIR_PASS(_, nir, nir_lower_flrp, 16 | 32 | 64, false /* always_precise */);
NIR_PASS(_, nir, nir_lower_var_copies);
NIR_PASS(_, nir, nir_lower_alu);