1#include <metal_stdlib> 2#include <simd/simd.h> 3using namespace metal; 4struct S { 5 float f; 6 array<float, 5> af; 7 float4 h4; 8 array<float4, 5> ah4; 9}; 10struct Uniforms { 11 float4 colorGreen; 12}; 13struct Inputs { 14}; 15struct Outputs { 16 float4 sk_FragColor [[color(0)]]; 17}; 18struct Globals { 19 float4 globalVar; 20 S globalStruct; 21}; 22fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 23 Globals _globals{{}, {}}; 24 (void)_globals; 25 Outputs _out; 26 (void)_out; 27 int i; 28 i = 0; 29 int4 i4; 30 i4 = int4(1, 2, 3, 4); 31 float3x3 f3x3; 32 f3x3 = float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0)); 33 float4 x; 34 x.w = 0.0; 35 x.yx = float2(0.0); 36 array<int, 1> ai; 37 ai[0] = 0; 38 array<int4, 1> ai4; 39 ai4[0] = int4(1, 2, 3, 4); 40 array<float3x3, 1> ah2x4; 41 ah2x4[0] = float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0)); 42 array<float4, 1> af4; 43 af4[0].x = 0.0; 44 af4[0].ywxz = float4(1.0); 45 S s; 46 s.f = 0.0; 47 s.af[1] = 0.0; 48 s.h4.zxy = float3(9.0); 49 s.ah4[2].yw = float2(5.0); 50 _globals.globalVar = float4(0.0); 51 _globals.globalStruct.f = 0.0; 52 float l; 53 l = 0.0; 54 ai[0] += ai4[0].x; 55 s.f = 1.0; 56 s.af[0] = 2.0; 57 s.h4 = float4(1.0); 58 s.ah4[0] = float4(2.0); 59 af4[0] *= ah2x4[0][0].x; 60 i4.y = i4.y * i; 61 x.y = x.y * l; 62 s.f *= l; 63 _out.sk_FragColor = _uniforms.colorGreen; 64 return _out; 65} 66