2021-07-05 15:56:32 +00:00
|
|
|
#include <metal_stdlib>
|
2021-06-24 19:01:06 +00:00
|
|
|
|
2021-07-05 15:56:32 +00:00
|
|
|
using namespace metal;
|
2021-06-24 19:01:06 +00:00
|
|
|
struct DrawIndirectArgs {
|
2021-07-05 15:56:32 +00:00
|
|
|
/* 0x0000 */ atomic_uint vertexCount;
|
2021-06-24 19:01:06 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 15:00:39 +00:00
|
|
|
void computeMain_inner(uint3 global_id, device DrawIndirectArgs* const tint_symbol, thread uint* const tint_symbol_1) {
|
|
|
|
uint const firstVertex = atomic_fetch_add_explicit(&((*(tint_symbol)).vertexCount), *(tint_symbol_1), memory_order_relaxed);
|
2021-08-04 22:15:28 +00:00
|
|
|
}
|
|
|
|
|
2021-10-28 15:00:39 +00:00
|
|
|
kernel void computeMain(device DrawIndirectArgs* tint_symbol_2 [[buffer(0)]], uint3 global_id [[thread_position_in_grid]]) {
|
|
|
|
thread uint tint_symbol_3 = 0u;
|
|
|
|
computeMain_inner(global_id, tint_symbol_2, &(tint_symbol_3));
|
2021-07-05 15:56:32 +00:00
|
|
|
return;
|
2021-06-24 19:01:06 +00:00
|
|
|
}
|
|
|
|
|