mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
refactor(glsl-out): Pack4x{I,U}8: make was_signed use `matches!(…)
This commit is contained in:
@@ -3880,11 +3880,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
||||
}
|
||||
|
||||
fun @ (Mf::Pack4xI8 | Mf::Pack4xU8) => {
|
||||
let was_signed = match fun {
|
||||
Mf::Pack4xI8 => true,
|
||||
Mf::Pack4xU8 => false,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let was_signed = matches!(fun, Mf::Pack4xI8);
|
||||
let const_suffix = if was_signed { "" } else { "u" };
|
||||
if was_signed {
|
||||
write!(self.out, "uint(")?;
|
||||
|
||||
Reference in New Issue
Block a user