1#include <metal_stdlib> 2#include <simd/simd.h> 3#ifdef __clang__ 4#pragma clang diagnostic ignored "-Wall" 5#endif 6using namespace metal; 7struct A { 8 int x; 9 int y; 10}; 11struct B { 12 float x; 13 array<float, 2> y; 14 A z; 15}; 16struct Inputs { 17}; 18struct Outputs { 19 half4 sk_FragColor [[color(0)]]; 20}; 21struct Globals { 22 A a1; 23 B b1; 24}; 25fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 26 Globals _globals{{}, {}}; 27 (void)_globals; 28 Outputs _out; 29 (void)_out; 30 _globals.a1.x = 0; 31 _globals.b1.x = 0.0; 32 _out.sk_FragColor.x = half(_globals.a1.x) + half(_globals.b1.x); 33 return _out; 34} 35