blob: e0da11b9a552b8c66e5f69bbe00ca28f42e2b151 [file] [log] [blame]
struct compute_main_inputs {
uint local_invocation_index_1_param : SV_GroupIndex;
};
static uint local_invocation_index_1 = 0u;
groupshared uint wg[4];
void compute_main_inner(uint local_invocation_index_2) {
uint idx = 0u;
idx = local_invocation_index_2;
{
while(true) {
if (!((idx < 4u))) {
break;
}
uint x_26 = idx;
uint v = 0u;
InterlockedExchange(wg[x_26], 0u, v);
{
idx = (idx + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
uint v_1 = 0u;
InterlockedExchange(wg[int(1)], 1u, v_1);
}
void compute_main_1() {
uint x_47 = local_invocation_index_1;
compute_main_inner(x_47);
}
void compute_main_inner_1(uint local_invocation_index_1_param) {
{
uint v_2 = 0u;
v_2 = local_invocation_index_1_param;
while(true) {
uint v_3 = v_2;
if ((v_3 >= 4u)) {
break;
}
uint v_4 = 0u;
InterlockedExchange(wg[v_3], 0u, v_4);
{
v_2 = (v_3 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
local_invocation_index_1 = local_invocation_index_1_param;
compute_main_1();
}
[numthreads(1, 1, 1)]
void compute_main(compute_main_inputs inputs) {
compute_main_inner_1(inputs.local_invocation_index_1_param);
}