nak: Match on the SrcRef directly in Src::is_nonzero()
Calling as_u32() isn't really doing us any good here since we want to fail for SrcRef::Zero anyway. Also assert that src_mod == None since we don't handle FNeg in this path. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
This commit is contained in:
committed by
Marge Bot
parent
a82b569649
commit
cb156a468e
@@ -1304,7 +1304,8 @@ impl Src {
|
||||
}
|
||||
|
||||
pub fn is_nonzero(&self) -> bool {
|
||||
matches!(self.as_u32(), Some(x) if x != 0)
|
||||
assert!(self.src_mod.is_none());
|
||||
matches!(self.src_ref, SrcRef::Imm32(x) if x != 0)
|
||||
}
|
||||
|
||||
pub fn is_fneg_zero(&self, src_type: SrcType) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user