2022-01-18 18:58:16 +00:00
|
|
|
struct SB {
|
2022-03-28 14:31:22 +00:00
|
|
|
data : array<i32>,
|
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;
|
|
|
|
}
|