nak: allow vector sources for f2f16 conversions

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40298>
This commit is contained in:
Karol Herbst 2026-03-09 16:47:20 +01:00 committed by Marge Bot
parent 458923803d
commit f2fa7d0e9c

View file

@ -652,11 +652,18 @@ impl<'a> ShaderFromNir<'a> {
srcs_vec.push(Some(b.prmt4(prmt_srcs, prmt).into()));
}
32 => {
assert!(comps == 1);
let s = usize::from(alu_src.swizzle[0]);
srcs_vec.push(Some(ssa[s].into()));
}
32 => match comps {
1 => {
let s = usize::from(alu_src.swizzle[0]);
srcs_vec.push(Some(ssa[s].into()));
}
2 => {
let s0 = usize::from(alu_src.swizzle[0]);
let s1 = usize::from(alu_src.swizzle[1]);
srcs_vec.push(Some([ssa[s0], ssa[s1]].into()));
}
_ => panic!("Invalid num_components: {comps}"),
},
64 => {
assert!(comps == 1);
let s = usize::from(alu_src.swizzle[0]);