1cb93a386Sopenharmony_ci#include <metal_stdlib>
2cb93a386Sopenharmony_ci#include <simd/simd.h>
3cb93a386Sopenharmony_ciusing namespace metal;
4cb93a386Sopenharmony_cistruct Uniforms {
5cb93a386Sopenharmony_ci    half4 colorGreen;
6cb93a386Sopenharmony_ci    half4 colorRed;
7cb93a386Sopenharmony_ci};
8cb93a386Sopenharmony_cistruct Inputs {
9cb93a386Sopenharmony_ci};
10cb93a386Sopenharmony_cistruct Outputs {
11cb93a386Sopenharmony_ci    half4 sk_FragColor [[color(0)]];
12cb93a386Sopenharmony_ci};
13cb93a386Sopenharmony_cifragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
14cb93a386Sopenharmony_ci    Outputs _out;
15cb93a386Sopenharmony_ci    (void)_out;
16cb93a386Sopenharmony_ci    bool4 v = bool4(bool(_uniforms.colorGreen.y));
17cb93a386Sopenharmony_ci    bool4 result;
18cb93a386Sopenharmony_ci    result = bool4(v.x, true, true, true);
19cb93a386Sopenharmony_ci    result = bool4(v.xy, false, true);
20cb93a386Sopenharmony_ci    result = bool4(v.x, true, true, false);
21cb93a386Sopenharmony_ci    result = bool4(false, v.y, true, true);
22cb93a386Sopenharmony_ci    result = bool4(v.xyz, true);
23cb93a386Sopenharmony_ci    result = bool4(v.xy, true, true);
24cb93a386Sopenharmony_ci    result = bool4(v.x, false, v.z, true);
25cb93a386Sopenharmony_ci    result = bool4(v.x, true, false, false);
26cb93a386Sopenharmony_ci    result = bool4(true, v.yz, false);
27cb93a386Sopenharmony_ci    result = bool4(false, v.y, true, false);
28cb93a386Sopenharmony_ci    result = bool4(true, true, v.z, false);
29cb93a386Sopenharmony_ci    result = v;
30cb93a386Sopenharmony_ci    result = bool4(v.xyz, true);
31cb93a386Sopenharmony_ci    result = bool4(v.xy, false, v.w);
32cb93a386Sopenharmony_ci    result = bool4(v.xy, true, false);
33cb93a386Sopenharmony_ci    result = bool4(v.x, true, v.zw);
34cb93a386Sopenharmony_ci    result = bool4(v.x, false, v.z, true);
35cb93a386Sopenharmony_ci    result = bool4(v.x, true, true, v.w);
36cb93a386Sopenharmony_ci    result = bool4(v.x, true, false, true);
37cb93a386Sopenharmony_ci    result = bool4(true, v.yzw);
38cb93a386Sopenharmony_ci    result = bool4(false, v.yz, true);
39cb93a386Sopenharmony_ci    result = bool4(false, v.y, true, v.w);
40cb93a386Sopenharmony_ci    result = bool4(true, v.y, true, true);
41cb93a386Sopenharmony_ci    result = bool4(false, false, v.zw);
42cb93a386Sopenharmony_ci    result = bool4(false, false, v.z, true);
43cb93a386Sopenharmony_ci    result = bool4(false, true, true, v.w);
44cb93a386Sopenharmony_ci    _out.sk_FragColor = any(result) ? _uniforms.colorGreen : _uniforms.colorRed;
45cb93a386Sopenharmony_ci    return _out;
46cb93a386Sopenharmony_ci}
47