2021-06-03 09:38:34 +00:00
|
|
|
struct ComputeInputs0 {
|
|
|
|
[[builtin(local_invocation_id)]]
|
|
|
|
local_invocation_id : vec3<u32>;
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-06-03 09:38:34 +00:00
|
|
|
|
|
|
|
struct ComputeInputs1 {
|
|
|
|
[[builtin(workgroup_id)]]
|
|
|
|
workgroup_id : vec3<u32>;
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-06-03 09:38:34 +00:00
|
|
|
|
2021-06-29 18:39:44 +00:00
|
|
|
[[stage(compute), workgroup_size(1)]]
|
2021-06-03 09:38:34 +00:00
|
|
|
fn main(inputs0 : ComputeInputs0, [[builtin(local_invocation_index)]] local_invocation_index : u32, [[builtin(global_invocation_id)]] global_invocation_id : vec3<u32>, inputs1 : ComputeInputs1) {
|
|
|
|
let foo : u32 = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x);
|
|
|
|
}
|