| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_private_vars_struct { |
| uint cubeVerts; |
| }; |
| |
| struct DrawIndirectArgs { |
| /* 0x0000 */ atomic_uint vertexCount; |
| }; |
| |
| void computeMain_inner(uint3 global_id, thread tint_private_vars_struct* const tint_private_vars, device DrawIndirectArgs* const tint_symbol) { |
| uint const firstVertex = atomic_fetch_add_explicit(&((*(tint_symbol)).vertexCount), (*(tint_private_vars)).cubeVerts, memory_order_relaxed); |
| } |
| |
| kernel void computeMain(device DrawIndirectArgs* tint_symbol_1 [[buffer(0)]], uint3 global_id [[thread_position_in_grid]]) { |
| thread tint_private_vars_struct tint_private_vars = {}; |
| tint_private_vars.cubeVerts = 0u; |
| computeMain_inner(global_id, &(tint_private_vars), tint_symbol_1); |
| return; |
| } |
| |