wgpu/tests/in/globals.wgsl
2021-08-13 23:01:25 -04:00

13 lines
226 B
WebGPU Shading Language

// Global variable & constant declarations
let Foo: bool = true;
var<workgroup> wg : array<f32, 10u>;
var<workgroup> at: atomic<u32>;
[[stage(compute), workgroup_size(1)]]
fn main() {
wg[3] = 1.0;
atomicStore(&at, 2u);
}