2021-06-03 09:38:34 +00:00
|
|
|
struct ComputeInputs {
|
2022-01-19 22:46:57 +00:00
|
|
|
@builtin(local_invocation_id)
|
2022-03-28 14:31:22 +00:00
|
|
|
local_invocation_id : vec3<u32>,
|
2022-01-19 22:46:57 +00:00
|
|
|
@builtin(local_invocation_index)
|
2022-03-28 14:31:22 +00:00
|
|
|
local_invocation_index : u32,
|
2022-01-19 22:46:57 +00:00
|
|
|
@builtin(global_invocation_id)
|
2022-03-28 14:31:22 +00:00
|
|
|
global_invocation_id : vec3<u32>,
|
2022-01-19 22:46:57 +00:00
|
|
|
@builtin(workgroup_id)
|
2022-03-28 14:31:22 +00:00
|
|
|
workgroup_id : vec3<u32>,
|
2022-01-19 22:46:57 +00:00
|
|
|
@builtin(num_workgroups)
|
2022-03-28 14:31:22 +00:00
|
|
|
num_workgroups : vec3<u32>,
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-06-03 09:38:34 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@stage(compute) @workgroup_size(1)
|
2021-06-03 09:38:34 +00:00
|
|
|
fn main(inputs : ComputeInputs) {
|
2021-09-13 17:11:58 +00:00
|
|
|
let foo : u32 = ((((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x) + inputs.num_workgroups.x);
|
2021-06-03 09:38:34 +00:00
|
|
|
}
|