blob: 248acb80002b7e1c5da598a4c177ed8d3c77b3bd [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup int* arg_0;
device int* prevent_dce;
};
struct tint_symbol_1 {
int tint_symbol;
};
void workgroupUniformLoad_9d33de(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
int const v = (*tint_module_vars.arg_0);
threadgroup_barrier(mem_flags::mem_threadgroup);
int res = v;
(*tint_module_vars.prevent_dce) = res;
}
void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
if ((tint_local_index == 0u)) {
(*tint_module_vars.arg_0) = 0;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
workgroupUniformLoad_9d33de(tint_module_vars);
}
kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]], device int* prevent_dce [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v_1).tint_symbol), .prevent_dce=prevent_dce};
compute_main_inner(tint_local_index, tint_module_vars);
}