Ben Clayton f2c1d0aa5b tint: Add test cases for tint:1666
This change does not attempt to fix this issue.

Bug: tint:1665
Bug: tint:1666
Change-Id: I9b40a25279b939977c826f38592518b6b086c06b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101161
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-09-21 17:19:04 +00:00

30 lines
463 B
WebGPU Shading Language

fn vector() {
let idx = 3;
let x = vec2(1,2)[idx];
}
fn matrix() {
let idx = 4;
let x = mat2x2(1,2,3,4)[idx];
}
fn fixed_size_array() {
let arr = array(1,2);
let idx = 3;
let x = arr[idx];
}
@group(0) @binding(0) var<storage> rarr : array<f32>;
fn runtime_size_array() {
let idx = -1;
let x = rarr[idx];
}
@compute @workgroup_size(1)
fn f() {
vector();
matrix();
fixed_size_array();
runtime_size_array();
}