2022-01-18 18:58:16 +00:00
|
|
|
struct SB {
|
|
|
|
data : array<i32>;
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2022-01-18 18:58:16 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<storage, read_write> buffer : SB;
|
2022-01-18 18:58:16 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@stage(compute) @workgroup_size(1, 2, 3)
|
|
|
|
fn main(@builtin(global_invocation_id) id : vec3<u32>) {
|
2022-01-18 18:58:16 +00:00
|
|
|
buffer.data[id.x] = (buffer.data[id.x] + 1);
|
|
|
|
}
|