| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_private_vars_struct { |
| uint tint_msl_thread_index_in_quadgroup; |
| }; |
| |
| |
| half tint_msl_quadSwapDiagonal(half e, thread tint_private_vars_struct* const tint_private_vars) { |
| return quad_shuffle(e,((*(tint_private_vars)).tint_msl_thread_index_in_quadgroup ^ 3u)); |
| } |
| |
| half quadSwapDiagonal_2be5e7(thread tint_private_vars_struct* const tint_private_vars) { |
| half res = tint_msl_quadSwapDiagonal(1.0h, tint_private_vars); |
| return res; |
| } |
| |
| fragment void fragment_main(device half* tint_symbol [[buffer(0)]], uint tint_thread_index_in_quadgroup [[thread_index_in_quadgroup]]) { |
| thread tint_private_vars_struct tint_private_vars = {}; |
| { |
| tint_private_vars.tint_msl_thread_index_in_quadgroup = tint_thread_index_in_quadgroup; |
| } |
| *(tint_symbol) = quadSwapDiagonal_2be5e7(&(tint_private_vars)); |
| return; |
| } |
| |
| kernel void compute_main(device half* tint_symbol_1 [[buffer(0)]], uint tint_thread_index_in_quadgroup_1 [[thread_index_in_quadgroup]]) { |
| thread tint_private_vars_struct tint_private_vars = {}; |
| { |
| tint_private_vars.tint_msl_thread_index_in_quadgroup = tint_thread_index_in_quadgroup_1; |
| } |
| *(tint_symbol_1) = quadSwapDiagonal_2be5e7(&(tint_private_vars)); |
| return; |
| } |
| |