mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-23 15:23:33 +00:00
13 lines
226 B
WebGPU Shading Language
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);
|
|
}
|