xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/MixFloatES3.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _7_colorGreen : packoffset(c0);
4    float4 _7_colorRed : packoffset(c1);
5    float4 _7_colorBlack : packoffset(c2);
6    float4 _7_colorWhite : packoffset(c3);
7    float4 _7_testInputs : packoffset(c4);
8};
9
10
11static float4 sk_FragColor;
12
13struct SPIRV_Cross_Output
14{
15    float4 sk_FragColor : SV_Target0;
16};
17
18float4 main(float2 _21)
19{
20    bool4 _40 = bool4(_7_colorGreen.x != 0.0f, _7_colorGreen.y != 0.0f, _7_colorGreen.z != 0.0f, _7_colorGreen.w != 0.0f);
21    bool4 FTFT = _40;
22    bool4 _42 = _40.wzyx;
23    bool4 TFTF = _42;
24    bool _89 = false;
25    if ((_40.x ? _7_colorWhite.x : _7_colorBlack.x) == _7_colorBlack.x)
26    {
27        bool2 _81 = _40.xy;
28        float2 _66 = float2(_81.x ? _7_colorWhite.xy.x : _7_colorBlack.xy.x, _81.y ? _7_colorWhite.xy.y : _7_colorBlack.xy.y);
29        float2 _86 = float2(_7_colorBlack.x, 1.0f);
30        _89 = all(bool2(_66.x == _86.x, _66.y == _86.y));
31    }
32    else
33    {
34        _89 = false;
35    }
36    bool _118 = false;
37    if (_89)
38    {
39        bool3 _108 = _40.xyz;
40        float3 _92 = float3(_108.x ? _7_colorWhite.xyz.x : _7_colorBlack.xyz.x, _108.y ? _7_colorWhite.xyz.y : _7_colorBlack.xyz.y, _108.z ? _7_colorWhite.xyz.z : _7_colorBlack.xyz.z);
41        float3 _115 = float3(_7_colorBlack.x, 1.0f, _7_colorBlack.z);
42        _118 = all(bool3(_92.x == _115.x, _92.y == _115.y, _92.z == _115.z));
43    }
44    else
45    {
46        _118 = false;
47    }
48    bool _139 = false;
49    if (_118)
50    {
51        float4 _121 = float4(_40.x ? _7_colorWhite.x : _7_colorBlack.x, _40.y ? _7_colorWhite.y : _7_colorBlack.y, _40.z ? _7_colorWhite.z : _7_colorBlack.z, _40.w ? _7_colorWhite.w : _7_colorBlack.w);
52        float4 _136 = float4(_7_colorBlack.x, 1.0f, _7_colorBlack.z, 1.0f);
53        _139 = all(bool4(_121.x == _136.x, _121.y == _136.y, _121.z == _136.z, _121.w == _136.w));
54    }
55    else
56    {
57        _139 = false;
58    }
59    bool _161 = false;
60    if (_139)
61    {
62        _161 = (_42.x ? _7_testInputs.x : _7_colorWhite.x) == _7_testInputs.x;
63    }
64    else
65    {
66        _161 = false;
67    }
68    bool _185 = false;
69    if (_161)
70    {
71        bool2 _178 = _42.xy;
72        float2 _164 = float2(_178.x ? _7_testInputs.xy.x : _7_colorWhite.xy.x, _178.y ? _7_testInputs.xy.y : _7_colorWhite.xy.y);
73        float2 _182 = float2(_7_testInputs.x, 1.0f);
74        _185 = all(bool2(_164.x == _182.x, _164.y == _182.y));
75    }
76    else
77    {
78        _185 = false;
79    }
80    bool _212 = false;
81    if (_185)
82    {
83        bool3 _202 = _42.xyz;
84        float3 _188 = float3(_202.x ? _7_testInputs.xyz.x : _7_colorWhite.xyz.x, _202.y ? _7_testInputs.xyz.y : _7_colorWhite.xyz.y, _202.z ? _7_testInputs.xyz.z : _7_colorWhite.xyz.z);
85        float3 _209 = float3(_7_testInputs.x, 1.0f, _7_testInputs.z);
86        _212 = all(bool3(_188.x == _209.x, _188.y == _209.y, _188.z == _209.z));
87    }
88    else
89    {
90        _212 = false;
91    }
92    bool _233 = false;
93    if (_212)
94    {
95        float4 _215 = float4(_42.x ? _7_testInputs.x : _7_colorWhite.x, _42.y ? _7_testInputs.y : _7_colorWhite.y, _42.z ? _7_testInputs.z : _7_colorWhite.z, _42.w ? _7_testInputs.w : _7_colorWhite.w);
96        float4 _230 = float4(_7_testInputs.x, 1.0f, _7_testInputs.z, 1.0f);
97        _233 = all(bool4(_215.x == _230.x, _215.y == _230.y, _215.z == _230.z, _215.w == _230.w));
98    }
99    else
100    {
101        _233 = false;
102    }
103    float4 _234 = 0.0f.xxxx;
104    if (_233)
105    {
106        _234 = _7_colorGreen;
107    }
108    else
109    {
110        _234 = _7_colorRed;
111    }
112    return _234;
113}
114
115void frag_main()
116{
117    float2 _17 = 0.0f.xx;
118    sk_FragColor = main(_17);
119}
120
121SPIRV_Cross_Output main()
122{
123    frag_main();
124    SPIRV_Cross_Output stage_output;
125    stage_output.sk_FragColor = sk_FragColor;
126    return stage_output;
127}
128