mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 06:03:34 +00:00
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>
18 lines
301 B
WebGPU Shading Language
18 lines
301 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;
|
|
}
|