James Price 85d2e448de msl: Overload matrix-vector arithmetic operators
These operators are not defined in the metal namespace when the vector
operands are packed.

Fixed: tint:1121
Change-Id: I2e8f4302e08117ca41bac6c05fb24a70d1215740
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62480
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-08-23 21:45:23 +00:00

12 lines
193 B
WebGPU Shading Language

[[block]]
struct S {
matrix : mat4x3<f32>;
vector : vec3<f32>;
};
[[group(0), binding(0)]] var<uniform> data: S;
[[stage(fragment)]]
fn main() {
let x = data.vector * data.matrix;
}