blob: f0afd32ab9cf7905e416b297114e48df5e754509 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct SB_RW {
/* 0x0000 */ atomic_uint arg_0;
};
struct tint_module_vars_struct {
device uint* prevent_dce;
device SB_RW* sb_rw;
};
uint atomicXor_54510e(tint_module_vars_struct tint_module_vars) {
uint res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), 1u, memory_order_relaxed);
return res;
}
fragment void fragment_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
(*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
}
kernel void compute_main(device uint* prevent_dce [[buffer(0)]], device SB_RW* sb_rw [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .sb_rw=sb_rw};
(*tint_module_vars.prevent_dce) = atomicXor_54510e(tint_module_vars);
}