wgpu
wgpu copied to clipboard
[wgsl-in] Expression `some_matrix.x` should be rejected
Description
wgpu/naga accepts a named component expression to access columns of a matrix (matrix.x
, matrix.y
, etc), but this is not permitted by the specification; the .
syntax applies to vectors and structures, but not matrices.
Repro steps
naga-cli
accepts the following code:
fn foo(ip: mat4x4<f32>) -> f32 {
return ip.z.z;
}
Expected vs observed behavior Should be an error; is not.
Platform wgpu 0.19.3; also tested at current git fb305b85f692f3fbbd9509b648dfbc97072f7465