Skip to content

Commit

Permalink
Use TypeInner::scalar_kind()
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Sep 6, 2023
1 parent 33aaa28 commit d16e605
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/back/msl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1715,15 +1715,8 @@ impl<W: Write> Writer<W> {
Mf::Reflect => "reflect",
Mf::Refract => "refract",
// computational
Mf::Sign => match arg_type {
&crate::TypeInner::Scalar {
kind: crate::ScalarKind::Sint,
..
}
| &crate::TypeInner::Vector {
kind: crate::ScalarKind::Sint,
..
} => ISIGN_FUNCTION,
Mf::Sign => match arg_type.scalar_kind() {
Some(crate::ScalarKind::Sint) => ISIGN_FUNCTION,
_ => "sign",
},
Mf::Fma => "fma",
Expand Down

0 comments on commit d16e605

Please sign in to comment.