blob: 2e733b3f1ee24031a686f472e135cf8aeb73f6bc [file] [log] [blame] [edit]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup float4* v;
};
struct tint_symbol_1 {
float4 tint_symbol;
};
float4 foo(tint_module_vars_struct tint_module_vars) {
threadgroup_barrier(mem_flags::mem_threadgroup);
float4 const v_1 = (*tint_module_vars.v);
threadgroup_barrier(mem_flags::mem_threadgroup);
return v_1;
}
void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
if ((tint_local_index < 1u)) {
(*tint_module_vars.v) = float4(0.0f);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
foo(tint_module_vars);
}
[[max_total_threads_per_threadgroup(1)]]
kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_3).tint_symbol)};
main_inner(tint_local_index, tint_module_vars);
}