mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
[naga wgsl-out] Correctly include width in matrix constructions.
When generating WGSL for an `Expression::Compose` constructing a matrix, consult `TypeInner::Matrix::width` when writing the type name in the construction expression, rather than just always writing `matNxM<f32>`. Fixes #4681.
This commit is contained in:
parent
721e611b79
commit
16965f64e5
@ -524,14 +524,14 @@ impl<W: Write> Writer<W> {
|
||||
TypeInner::Matrix {
|
||||
columns,
|
||||
rows,
|
||||
width: _,
|
||||
width,
|
||||
} => {
|
||||
write!(
|
||||
self.out,
|
||||
//TODO: Can matrix be other than f32?
|
||||
"mat{}x{}<f32>",
|
||||
"mat{}x{}<{}>",
|
||||
back::vector_size_str(columns),
|
||||
back::vector_size_str(rows),
|
||||
scalar_kind_str(crate::Scalar::float(width))
|
||||
)?;
|
||||
}
|
||||
TypeInner::Pointer { base, space } => {
|
||||
|
Loading…
Reference in New Issue
Block a user