| #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; |
| float4 output_4; |
| float4 output_5; |
| }; |
| |
| 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)]]; |
| float4 output_4 [[color(2)]]; |
| float output_2 [[color(3)]]; |
| float4 output_5 [[color(4)]]; |
| int output_1 [[color(6)]]; |
| }; |
| |
| struct Out { |
| float4 x; |
| float4 y; |
| float4 z; |
| }; |
| |
| 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); |
| } |
| |
| Out f_inner(thread tint_private_vars_struct* const tint_private_vars) { |
| f2(tint_private_vars); |
| Out const tint_symbol_5 = Out{.x=float4(10.0f), .y=float4(20.0f), .z=float4(30.0f)}; |
| return tint_symbol_5; |
| } |
| |
| 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; |
| Out 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.x, .output_4=result.y, .output_5=result.z}; |
| 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; |
| wrapper_result.output_4 = inner_result.output_4; |
| wrapper_result.output_5 = inner_result.output_5; |
| return wrapper_result; |
| } |
| |