nak: Allow predicates in nir_intrinsic_as_uniform

As of 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants"), we can
now get predicates as inputs to as_uniform.  We can't assume the result
will always be a UGPR.

Fixes: 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12970
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34434>
This commit is contained in:
Faith Ekstrand 2025-04-09 10:10:23 -05:00 committed by Marge Bot
parent 916d7277c0
commit 4d1399629b

View file

@ -2178,7 +2178,7 @@ impl<'a> ShaderFromNir<'a> {
let src = self.get_ssa(srcs[0].as_def());
let mut dst = Vec::new();
for comp in src {
let u = b.alloc_ssa(RegFile::UGPR, 1);
let u = b.alloc_ssa(comp.file().to_uniform().unwrap(), 1);
b.push_op(OpR2UR {
src: [*comp].into(),
dst: u.into(),