mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
nak: Add Src::is_unmodified() helper
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: bad23ddb48 ("nak: Add F16 and F16v2 sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
This commit is contained in:
parent
d91ba8f36d
commit
6e72f0f81b
1 changed files with 5 additions and 1 deletions
|
|
@ -1202,6 +1202,10 @@ impl Src {
|
|||
b.into()
|
||||
}
|
||||
|
||||
pub fn is_unmodified(&self) -> bool {
|
||||
self.src_mod.is_none() && self.src_swizzle.is_none()
|
||||
}
|
||||
|
||||
pub fn fabs(self) -> Src {
|
||||
Src {
|
||||
src_ref: self.src_ref,
|
||||
|
|
@ -1241,7 +1245,7 @@ impl Src {
|
|||
_ => return None,
|
||||
};
|
||||
|
||||
if self.src_mod.is_none() && self.src_swizzle.is_none() {
|
||||
if self.is_unmodified() {
|
||||
return Some(u);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue