blob: f0269ec9b4ccc6716751fcb3d06fd8a3de727180 [file] [log] [blame]
struct atomic_compare_exchange_result_u32 {
uint old_value;
bool exchanged;
};
struct compute_main_inputs {
uint tint_local_index : SV_GroupIndex;
};
groupshared uint arg_0;
void atomicCompareExchangeWeak_83580d() {
uint v = 0u;
InterlockedCompareExchange(arg_0, 1u, 1u, v);
uint v_1 = v;
atomic_compare_exchange_result_u32 res = {v_1, (v_1 == 1u)};
}
void compute_main_inner(uint tint_local_index) {
if ((tint_local_index == 0u)) {
uint v_2 = 0u;
InterlockedExchange(arg_0, 0u, v_2);
}
GroupMemoryBarrierWithGroupSync();
atomicCompareExchangeWeak_83580d();
}
[numthreads(1, 1, 1)]
void compute_main(compute_main_inputs inputs) {
compute_main_inner(inputs.tint_local_index);
}