xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Degrees.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _7_testInputs : packoffset(c0);
4    float4 _7_colorGreen : packoffset(c1);
5    float4 _7_colorRed : packoffset(c2);
6};
7
8
9static float4 sk_FragColor;
10
11struct SPIRV_Cross_Output
12{
13    float4 sk_FragColor : SV_Target0;
14};
15
16float4 main(float2 _21)
17{
18    bool _50 = false;
19    if (abs(degrees(_7_testInputs.x) - (-71.61972808837890625f)) < 0.0500000007450580596923828125f)
20    {
21        float2 _41 = abs(degrees(_7_testInputs.xy) - float2(-71.61972808837890625f, 0.0f));
22        _50 = all(bool2(_41.x < 0.0500000007450580596923828125f.xx.x, _41.y < 0.0500000007450580596923828125f.xx.y));
23    }
24    else
25    {
26        _50 = false;
27    }
28    bool _66 = false;
29    if (_50)
30    {
31        float3 _55 = abs(degrees(_7_testInputs.xyz) - float3(-71.61972808837890625f, 0.0f, 42.971836090087890625f));
32        _66 = all(bool3(_55.x < 0.0500000007450580596923828125f.xxx.x, _55.y < 0.0500000007450580596923828125f.xxx.y, _55.z < 0.0500000007450580596923828125f.xxx.z));
33    }
34    else
35    {
36        _66 = false;
37    }
38    bool _80 = false;
39    if (_66)
40    {
41        float4 _71 = abs(degrees(_7_testInputs) - float4(-71.61972808837890625f, 0.0f, 42.971836090087890625f, 128.9155120849609375f));
42        _80 = all(bool4(_71.x < 0.0500000007450580596923828125f.xxxx.x, _71.y < 0.0500000007450580596923828125f.xxxx.y, _71.z < 0.0500000007450580596923828125f.xxxx.z, _71.w < 0.0500000007450580596923828125f.xxxx.w));
43    }
44    else
45    {
46        _80 = false;
47    }
48    float4 _81 = 0.0f.xxxx;
49    if (_80)
50    {
51        _81 = _7_colorGreen;
52    }
53    else
54    {
55        _81 = _7_colorRed;
56    }
57    return _81;
58}
59
60void frag_main()
61{
62    float2 _17 = 0.0f.xx;
63    sk_FragColor = main(_17);
64}
65
66SPIRV_Cross_Output main()
67{
68    frag_main();
69    SPIRV_Cross_Output stage_output;
70    stage_output.sk_FragColor = sk_FragColor;
71    return stage_output;
72}
73