dawn-cmake/test/intrinsics/arrayLength/deprecated.wgsl

14 lines
225 B
WebGPU Shading Language

struct S {
a : array<i32>;
};
@group(0) @binding(0) var<storage, read> G : S;
@stage(compute) @workgroup_size(1)
fn main() {
let l1 : u32 = arrayLength(&G.a);
let p = &G.a;
let l2 : u32 = arrayLength(p);
}