1#include <metal_stdlib> 2#include <simd/simd.h> 3#ifdef __clang__ 4#pragma clang diagnostic ignored "-Wall" 5#endif 6using namespace metal; 7struct Inputs { 8}; 9struct Outputs { 10 half4 sk_FragColor [[color(0)]]; 11}; 12struct testBlock { 13 float s; 14 char pad0[12]; 15 float2x2 m; 16 char pad1[16]; 17 array<float, 2> a; 18 char pad2[24]; 19 array<float2x2, 2> am; 20} test[2]; 21struct Globals { 22 constant testBlock* test; 23}; 24fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant array<testBlock, 2>& test [[buffer(123)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 25 Globals _globals{&test}; 26 (void)_globals; 27 Outputs _out; 28 (void)_out; 29 _out.sk_FragColor = half4(half(_uniforms.test[0].s), half(_uniforms.test[1].m[1].x), half(_uniforms.test[0].a[1]), half(_uniforms.test[1].am[1][0].y)); 30 return _out; 31} 32