mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +00:00
When these are used inside a function, we were not unwrapping the array from the struct that we wrapped it in. Fixed: tint:1385 Change-Id: Ide7bbd802394bf09819265be48d978ec9346adfe Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77180 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com>
12 lines
172 B
WebGPU Shading Language
12 lines
172 B
WebGPU Shading Language
[[group(0), binding(1)]]
|
|
var<storage, read> data : array<i32>;
|
|
|
|
fn foo() -> i32 {
|
|
return data[0];
|
|
}
|
|
|
|
[[stage(compute), workgroup_size(16, 16, 1)]]
|
|
fn main() {
|
|
foo();
|
|
}
|