1#include <metal_stdlib> 2#include <simd/simd.h> 3 4struct type6 { 5 float inner[1u]; 6}; 7struct gl_PerVertex { 8 metal::float4 gl_Position; 9 float gl_PointSize; 10 type6 gl_ClipDistance; 11 type6 gl_CullDistance; 12}; 13struct type10 { 14 metal::float2 member; 15 metal::float4 gl_Position1; 16 float gl_PointSize1; 17 type6 gl_ClipDistance1; 18 type6 gl_CullDistance1; 19}; 20constant metal::float4 const_type4_ = {0.0, 0.0, 0.0, 1.0}; 21constant type6 const_type6_ = {0.0}; 22constant gl_PerVertex const_gl_PerVertex = {const_type4_, 1.0, const_type6_, const_type6_}; 23 24void main1( 25 thread metal::float2& v_uv, 26 thread metal::float2 const& a_uv, 27 thread gl_PerVertex& perVertexStruct, 28 thread metal::float2 const& a_pos 29) { 30 v_uv = a_uv; 31 metal::float2 _e13 = a_pos; 32 perVertexStruct.gl_Position = metal::float4(_e13.x, _e13.y, 0.0, 1.0); 33 return; 34} 35 36struct main2Input { 37 metal::float2 a_uv1 [[attribute(1)]]; 38 metal::float2 a_pos1 [[attribute(0)]]; 39}; 40struct main2Output { 41 metal::float2 member [[user(loc0), center_perspective]]; 42 metal::float4 gl_Position1 [[position]]; 43 float gl_PointSize1 [[point_size]]; 44 float gl_ClipDistance1 [[clip_distance]] [1]; 45}; 46vertex main2Output main2( 47 main2Input varyings [[stage_in]] 48) { 49 metal::float2 v_uv = {}; 50 metal::float2 a_uv = {}; 51 gl_PerVertex perVertexStruct = const_gl_PerVertex; 52 metal::float2 a_pos = {}; 53 const auto a_uv1 = varyings.a_uv1; 54 const auto a_pos1 = varyings.a_pos1; 55 a_uv = a_uv1; 56 a_pos = a_pos1; 57 main1(v_uv, a_uv, perVertexStruct, a_pos); 58 const auto _tmp = type10 {v_uv, perVertexStruct.gl_Position, perVertexStruct.gl_PointSize, perVertexStruct.gl_ClipDistance, perVertexStruct.gl_CullDistance}; 59 return main2Output { _tmp.member, _tmp.gl_Position1, _tmp.gl_PointSize1, {_tmp.gl_ClipDistance1.inner[0]} }; 60} 61