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-07-05 15:56:32 +00:00
|
|
|
kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(5)]]) {
|
|
|
|
thread uint tint_symbol_1 = 0u;
|
|
|
|
uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), tint_symbol_1, memory_order_relaxed);
|
|
|
|
return;
|
2021-06-24 19:01:06 +00:00
|
|
|
}
|
|
|
|
|