James Price f6e5cc03bf Deprecate the @stride attribute
Update validation error for invalid uniform array element alignment.

Update tests to either remove the @stride attribute or use a different
element type.

Bug: tint:1381
Change-Id: I50b52cd78a34d9cd162fa5f2171a5fd35dcf3b79
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77560
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-01-20 22:11:07 +00:00

15 lines
295 B
WebGPU Shading Language

struct UBO {
data: array<vec4<i32>, 4>;
dynamic_idx: i32;
};
@group(0) @binding(0) var<uniform> ubo: UBO;
struct Result {
out: i32;
};
@group(0) @binding(2) var<storage, read_write> result: Result;
@stage(compute) @workgroup_size(1)
fn f() {
result.out = ubo.data[ubo.dynamic_idx].x;
}