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}; 12float userfunc_ff(float v) { 13 return v + 1.0; 14} 15fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 16 Outputs _out; 17 (void)_out; 18 float b = 2.0; 19 float c = 3.0; 20 b = 2.0; 21 b = c + 77.0; 22 b = sin(c + 77.0); 23 userfunc_ff(c + 77.0); 24 b = userfunc_ff(c + 77.0); 25 b = (b = cos(c)); 26 for (int x = 0;x < 1; ++x) { 27 continue; 28 } 29 float d = c; 30 b = 3.0; 31 d++; 32 _out.sk_FragColor = half4(half(b == 2.0), half(b == 3.0), half(d == 5.0), half(d == 4.0)); 33 return _out; 34} 35