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