1cb93a386Sopenharmony_ci#include <metal_stdlib>
2cb93a386Sopenharmony_ci#include <simd/simd.h>
3cb93a386Sopenharmony_ciusing namespace metal;
4cb93a386Sopenharmony_cistruct Uniforms {
5cb93a386Sopenharmony_ci    half4 testInputs;
6cb93a386Sopenharmony_ci    half4 colorGreen;
7cb93a386Sopenharmony_ci    half4 colorRed;
8cb93a386Sopenharmony_ci};
9cb93a386Sopenharmony_cistruct Inputs {
10cb93a386Sopenharmony_ci};
11cb93a386Sopenharmony_cistruct Outputs {
12cb93a386Sopenharmony_ci    half4 sk_FragColor [[color(0)]];
13cb93a386Sopenharmony_ci};
14cb93a386Sopenharmony_cifragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
15cb93a386Sopenharmony_ci    Outputs _out;
16cb93a386Sopenharmony_ci    (void)_out;
17cb93a386Sopenharmony_ci    half4 expected = half4(0.0h);
18cb93a386Sopenharmony_ci    _out.sk_FragColor = (((((((dfdx(_uniforms.testInputs.x) == expected.x && all(dfdx(_uniforms.testInputs.xy) == expected.xy)) && all(dfdx(_uniforms.testInputs.xyz) == expected.xyz)) && all(dfdx(_uniforms.testInputs) == expected)) && all(sign(fwidth(coords.xx)) == float2(1.0, 1.0))) && all(sign(fwidth(float2(coords.x, 1.0))) == float2(1.0, 0.0))) && all(sign(fwidth(coords.yy)) == float2(1.0, 1.0))) && all(sign(fwidth(float2(0.0, coords.y))) == float2(0.0, 1.0))) && all(sign(fwidth(coords)) == float2(1.0, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
19cb93a386Sopenharmony_ci    return _out;
20cb93a386Sopenharmony_ci}
21