2021-07-09 16:50:14 +00:00
|
|
|
uint atomicAdd_1(RWByteAddressBuffer buffer, uint offset, uint value) {
|
|
|
|
uint original_value = 0;
|
|
|
|
buffer.InterlockedAdd(offset, value, original_value);
|
|
|
|
return original_value;
|
|
|
|
}
|
|
|
|
|
2021-06-24 19:01:06 +00:00
|
|
|
RWByteAddressBuffer drawOut : register(u5, space0);
|
|
|
|
static uint cubeVerts = 0u;
|
|
|
|
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
uint3 global_id : SV_DispatchThreadID;
|
|
|
|
};
|
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void computeMain(tint_symbol_1 tint_symbol) {
|
|
|
|
const uint3 global_id = tint_symbol.global_id;
|
2021-07-09 16:50:14 +00:00
|
|
|
const uint firstVertex = atomicAdd_1(drawOut, 0u, cubeVerts);
|
2021-06-24 19:01:06 +00:00
|
|
|
return;
|
|
|
|
}
|