| #include <metal_stdlib> |
| using namespace metal; |
| template<typename T, size_t N> |
| struct tint_array { |
| const constant T& operator[](size_t i) const constant { return elements[i]; } |
| device T& operator[](size_t i) device { return elements[i]; } |
| const device T& operator[](size_t i) const device { return elements[i]; } |
| thread T& operator[](size_t i) thread { return elements[i]; } |
| const thread T& operator[](size_t i) const thread { return elements[i]; } |
| threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } |
| const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } |
| T elements[N]; |
| }; |
| |
| struct SB_RW { |
| tint_array<float, 1> arg_0; |
| }; |
| struct tint_module_vars_struct { |
| device SB_RW* sb_rw; |
| device uint* prevent_dce; |
| const constant tint_array<uint4, 1>* tint_storage_buffer_sizes; |
| }; |
| struct vertex_main_outputs { |
| float4 tint_symbol [[position]]; |
| }; |
| |
| void arrayLength_cdd123(tint_module_vars_struct tint_module_vars) { |
| uint res = (((*tint_module_vars.tint_storage_buffer_sizes)[0u][0u] - 0u) / 4u); |
| (*tint_module_vars.prevent_dce) = res; |
| } |
| float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) { |
| arrayLength_cdd123(tint_module_vars); |
| return float4(0.0f); |
| } |
| fragment void fragment_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) { |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; |
| arrayLength_cdd123(tint_module_vars); |
| } |
| kernel void compute_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) { |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; |
| arrayLength_cdd123(tint_module_vars); |
| } |
| vertex vertex_main_outputs vertex_main(device SB_RW* sb_rw [[buffer(0)]], device uint* prevent_dce [[buffer(1)]], const constant tint_array<uint4, 1>* tint_storage_buffer_sizes) { |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; |
| return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)}; |
| } |