nak: Allow YY swizzle for SM20 and SM32 asserts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

We now handle that specific form on F2F and F2I but were still
asserting.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 67bfbc7535 ("nak: rework swizzling on scalar FP16 ops")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41771>
This commit is contained in:
Mary Guillemard 2026-05-24 12:11:21 +02:00
parent e0eefe5999
commit b8fa4fd258
2 changed files with 6 additions and 4 deletions

View file

@ -148,7 +148,9 @@ enum AluSrc {
impl AluSrc {
fn from_src(src: Option<&Src>) -> AluSrc {
if let Some(src) = src {
assert!(src.src_swizzle.is_none());
assert!(
src.src_swizzle.is_none() || src.src_swizzle == SrcSwizzle::Yy
);
// do not assert src_mod, can be encoded by opcode.
match &src.src_ref {
@ -299,7 +301,7 @@ impl SM20Encoder<'_> {
}
fn set_reg_src(&mut self, range: Range<usize>, src: &Src) {
assert!(src.src_swizzle.is_none());
assert!(src.src_swizzle.is_none() || src.src_swizzle == SrcSwizzle::Yy);
self.set_reg_src_ref(range, &src.src_ref);
}

View file

@ -230,7 +230,7 @@ impl SM32Encoder<'_> {
}
fn set_reg_src(&mut self, range: Range<usize>, src: &Src) {
assert!(src.src_swizzle.is_none());
assert!(src.src_swizzle.is_none() || src.src_swizzle == SrcSwizzle::Yy);
self.set_reg_src_ref(range, &src.src_ref);
}
@ -319,7 +319,7 @@ enum AluSrc {
impl AluSrc {
fn from_src(src: &Src) -> AluSrc {
assert!(src.src_swizzle.is_none());
assert!(src.src_swizzle.is_none() || src.src_swizzle == SrcSwizzle::Yy);
// do not assert src_mod, can be encoded by opcode.
match &src.src_ref {