1#include <metal_stdlib> 2#include <simd/simd.h> 3#ifdef __clang__ 4#pragma clang diagnostic ignored "-Wall" 5#endif 6using namespace metal; 7struct Uniforms { 8 half4 colorGreen; 9 half4 colorRed; 10}; 11struct Inputs { 12}; 13struct Outputs { 14 half4 sk_FragColor [[color(0)]]; 15}; 16int out_param_func2_ih(Uniforms _uniforms, thread half& v) { 17 v = _uniforms.colorRed.x; 18 return int(v); 19} 20fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 21 Outputs _out; 22 (void)_out; 23 half _skTemp0; 24 int _skTemp1; 25 array<half, 2> testArray; 26 testArray[((_skTemp1 = out_param_func2_ih(_uniforms, _skTemp0)), (testArray[0] = _skTemp0), _skTemp1)]; 27 _out.sk_FragColor = testArray[0] == 1.0h && testArray[1] == 1.0h ? _uniforms.colorGreen : _uniforms.colorRed; 28 return _out; 29} 30