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}; 16bool out_params_are_distinct_bhh(thread half& x, thread half& y) { 17 x = 1.0h; 18 y = 2.0h; 19 return x == 1.0h && y == 2.0h; 20} 21fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 22 Outputs _out; 23 (void)_out; 24 half _skTemp0; 25 half _skTemp1; 26 bool _skTemp2; 27 half x = 0.0h; 28 _out.sk_FragColor = ((_skTemp2 = out_params_are_distinct_bhh(_skTemp0, _skTemp1)), (x = _skTemp0), (x = _skTemp1), _skTemp2) ? _uniforms.colorGreen : _uniforms.colorRed; 29 return _out; 30} 31