blob: 17bcc96f82cc9c83e0d1b41496f46f75971f982d [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct SB_RW {
atomic_int arg_0;
};
struct tint_module_vars_struct {
device SB_RW* sb_rw;
device int* prevent_dce;
};
void atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
int res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), 1, memory_order_relaxed);
(*tint_module_vars.prevent_dce) = res;
}
fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
atomicXor_c1b78c(tint_module_vars);
}
kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device int* prevent_dce [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
atomicXor_c1b78c(tint_module_vars);
}