6// Define the binding group layout
7@group(1) @binding(1) var<storage, read_write> result_0: array<u32>;
8@group(1) @binding(2) var<storage, read_write> aux_0: array<u32>;
10@group(1) @binding(4) var<storage, read_write> result_1: array<u32>;
11@group(1) @binding(5) var<storage, read_write> aux_1: array<u32>;
13const WORKGROUP_SIZE : u32 = 256u;
15@compute @workgroup_size(WORKGROUP_SIZE)
17 @builtin(global_invocation_id) global_id: vec3<u32>,
18 @builtin(local_invocation_id) local_id: vec3<u32>,
19 @builtin(workgroup_id) group_id: vec3<u32>
21 let gid = global_id.x;
23 if gid < arrayLength(&result_0) {
24 result_0[gid] += aux_0[wid];
25 result_1[gid] += aux_1[wid];
shader_source
Definition add_block_sums.wgsl.h:5