dawn-cmake/test/tint/ptr_ref/access/matrix.spvasm.expected.wgsl
James Price 506b4f05d0 [spirv-reader] Use type inference for var and let
When an initializer is present, use type inference instead of
explicitly typing `var` and `let` declarations. This reduces the size
of the generated WGSL and improves readability.

Change-Id: I241ee2108279b550735945940f2b62bbbd493708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132142
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
2023-05-23 18:28:44 +00:00

12 lines
236 B
WebGPU Shading Language

fn main_1() {
var m = mat3x3f();
m = mat3x3f(vec3f(1.0f, 2.0f, 3.0f), vec3f(4.0f, 5.0f, 6.0f), vec3f(7.0f, 8.0f, 9.0f));
m[1i] = vec3f(5.0f, 5.0f, 5.0f);
return;
}
@compute @workgroup_size(1i, 1i, 1i)
fn main() {
main_1();
}