radv: eliminate useless mov(const) after lowering all IO to scalar

This eliminates useless mov copies introduced by nir_lower_io_to_scalar
and this might be useful for nir_opt_varyings which optimizes
constant varyings.

It also uncovers a bug with mesh shader and constant varyaings that is
fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35081.

No fossils-db change on NAV21.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35090>
This commit is contained in:
Samuel Pitoiset 2025-05-21 15:29:57 +02:00 committed by Marge Bot
parent 3ec68e8382
commit a4a59a2504

View file

@ -1588,6 +1588,7 @@ radv_graphics_shaders_link_varyings(struct radv_shader_stage *stages)
/* Eliminate useless vec->mov copies resulting from scalarization. */
NIR_PASS(_, producer, nir_copy_prop);
NIR_PASS(_, producer, nir_opt_constant_folding);
}
int highest_changed_producer = -1;