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