dawn-cmake/test/bug/chromium/1290107.wgsl
Ben Clayton 3fe1bd3715 transform: Fix CalculateArrayLength for arrays
The transform was not correctly inserting the intrinsic call after array element types.

Fixed: chromium:1290107
Change-Id: I7199d1846cb98305d789cf0bc362eb5872d9b917
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78542
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2022-01-28 16:49:46 +00:00

11 lines
163 B
WebGPU Shading Language

struct S {
f : f32;
}
@group(0) @binding(0) var<storage, read> arr : array<S>;
@stage(compute) @workgroup_size(1)
fn main() {
let len = arrayLength(&arr);
}