| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct Interface { |
| float col1; |
| float col2; |
| float4 pos; |
| }; |
| |
| struct tint_symbol { |
| float col1 [[user(locn1)]]; |
| float col2 [[user(locn2)]]; |
| float4 pos [[position]]; |
| }; |
| |
| Interface vert_main_inner() { |
| Interface const tint_symbol_3 = Interface{.col1=0.400000006f, .col2=0.600000024f, .pos=float4(0.0f)}; |
| return tint_symbol_3; |
| } |
| |
| vertex tint_symbol vert_main() { |
| Interface const inner_result = vert_main_inner(); |
| tint_symbol wrapper_result = {}; |
| wrapper_result.col1 = inner_result.col1; |
| wrapper_result.col2 = inner_result.col2; |
| wrapper_result.pos = inner_result.pos; |
| return wrapper_result; |
| } |
| |
| struct tint_symbol_2 { |
| float col1 [[user(locn1)]]; |
| float col2 [[user(locn2)]]; |
| }; |
| |
| void frag_main_inner(Interface colors) { |
| float const r = colors.col1; |
| float const g = colors.col2; |
| } |
| |
| fragment void frag_main(float4 pos [[position]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { |
| Interface const tint_symbol_4 = {.col1=tint_symbol_1.col1, .col2=tint_symbol_1.col2, .pos=pos}; |
| frag_main_inner(tint_symbol_4); |
| return; |
| } |
| |