James Price | 7697c31 | 2021-06-04 14:40:28 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
| 4 | struct ComputeInputs0 { |
| 5 | uint3 local_invocation_id; |
| 6 | }; |
Ben Clayton | 8ec32a6 | 2022-02-09 23:55:51 +0000 | [diff] [blame] | 7 | |
James Price | 7697c31 | 2021-06-04 14:40:28 +0000 | [diff] [blame] | 8 | struct ComputeInputs1 { |
| 9 | uint3 workgroup_id; |
| 10 | }; |
| 11 | |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 12 | void tint_symbol_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) { |
Ben Clayton | 7103f51 | 2021-10-20 16:12:33 +0000 | [diff] [blame] | 13 | uint const foo = (((inputs0.local_invocation_id[0] + local_invocation_index) + global_invocation_id[0]) + inputs1.workgroup_id[0]); |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]]) { |
| 17 | ComputeInputs0 const tint_symbol_1 = {.local_invocation_id=local_invocation_id}; |
| 18 | ComputeInputs1 const tint_symbol_2 = {.workgroup_id=workgroup_id}; |
| 19 | tint_symbol_inner(tint_symbol_1, local_invocation_index, global_invocation_id, tint_symbol_2); |
James Price | 7697c31 | 2021-06-04 14:40:28 +0000 | [diff] [blame] | 20 | return; |
| 21 | } |
| 22 | |