blob: fb4d308cfcf75e163228f01d988ec92dd8580720 [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;
};
void atomicOr_5e95d4(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint res = atomic_fetch_or_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
(*tint_module_vars.prevent_dce) = res;
}
fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
atomicOr_5e95d4(tint_module_vars);
}
kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
atomicOr_5e95d4(tint_module_vars);
}