| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct PixelLocal { |
| uint a; |
| int b; |
| float c; |
| }; |
| |
| struct tint_private_vars_struct { |
| PixelLocal P; |
| }; |
| |
| struct f_res { |
| uint output_0; |
| int output_1; |
| float output_2; |
| float4 output_3; |
| }; |
| |
| struct tint_symbol_1 { |
| uint a [[color(1)]]; |
| float c [[color(3)]]; |
| int b [[color(6)]]; |
| }; |
| |
| struct tint_symbol_2 { |
| float4 output_3 [[color(0)]]; |
| uint output_0 [[color(1)]]; |
| float output_2 [[color(3)]]; |
| int output_1 [[color(6)]]; |
| }; |
| |
| void f0(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).P.a = ((*(tint_private_vars)).P.a + 9u); |
| } |
| |
| void f1(thread tint_private_vars_struct* const tint_private_vars) { |
| f0(tint_private_vars); |
| (*(tint_private_vars)).P.a = ((*(tint_private_vars)).P.a + 8u); |
| } |
| |
| void f2(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).P.a = ((*(tint_private_vars)).P.a + 7u); |
| f1(tint_private_vars); |
| } |
| |
| float4 f_inner(thread tint_private_vars_struct* const tint_private_vars) { |
| f2(tint_private_vars); |
| return float4(2.0f); |
| } |
| |
| f_res f_inner_1(PixelLocal pixel_local_1, thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).P = pixel_local_1; |
| float4 const result = f_inner(tint_private_vars); |
| f_res const tint_symbol_4 = {.output_0=(*(tint_private_vars)).P.a, .output_1=(*(tint_private_vars)).P.b, .output_2=(*(tint_private_vars)).P.c, .output_3=result}; |
| return tint_symbol_4; |
| } |
| |
| fragment tint_symbol_2 f(tint_symbol_1 tint_symbol [[stage_in]]) { |
| thread tint_private_vars_struct tint_private_vars = {}; |
| PixelLocal const tint_symbol_3 = {.a=tint_symbol.a, .b=tint_symbol.b, .c=tint_symbol.c}; |
| f_res const inner_result = f_inner_1(tint_symbol_3, &(tint_private_vars)); |
| tint_symbol_2 wrapper_result = {}; |
| wrapper_result.output_0 = inner_result.output_0; |
| wrapper_result.output_1 = inner_result.output_1; |
| wrapper_result.output_2 = inner_result.output_2; |
| wrapper_result.output_3 = inner_result.output_3; |
| return wrapper_result; |
| } |
| |