nak: Use as_u32() directly in Src::is_fneg_zero()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
This commit is contained in:
Faith Ekstrand
2025-05-05 10:29:12 -04:00
committed by Marge Bot
parent 274be4291e
commit c3417c3c82

View File

@@ -1310,13 +1310,12 @@ impl Src {
}
pub fn is_fneg_zero(&self, src_type: SrcType) -> bool {
match self.fold_imm(src_type).src_ref {
SrcRef::Zero => self.src_mod == SrcMod::FNeg,
SrcRef::Imm32(0x00008000) => src_type == SrcType::F16,
SrcRef::Imm32(0x80000000) => {
match self.as_u32(src_type) {
Some(0x00008000) => src_type == SrcType::F16,
Some(0x80000000) => {
src_type == SrcType::F32 || src_type == SrcType::F64
}
SrcRef::Imm32(0x80008000) => src_type == SrcType::F16v2,
Some(0x80008000) => src_type == SrcType::F16v2,
_ => false,
}
}