xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/IsInf.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    row_major float2x2 _7_testMatrix2x2 : packoffset(c0);
4    float4 _7_colorGreen : packoffset(c2);
5    float4 _7_colorRed : packoffset(c3);
6};
7
8
9static float4 sk_FragColor;
10
11struct SPIRV_Cross_Output
12{
13    float4 sk_FragColor : SV_Target0;
14};
15
16float4 main(float2 _22)
17{
18    float4 _43 = float4(_7_testMatrix2x2[0].x, _7_testMatrix2x2[0].y, _7_testMatrix2x2[1].x, _7_testMatrix2x2[1].y) * (1.0f / _7_colorGreen.x);
19    float4 infiniteValue = _43;
20    float4 _56 = float4(_7_testMatrix2x2[0].x, _7_testMatrix2x2[0].y, _7_testMatrix2x2[1].x, _7_testMatrix2x2[1].y) * (1.0f / _7_colorGreen.y);
21    float4 finiteValue = _56;
22    bool _67 = false;
23    if (isinf(_43.x))
24    {
25        _67 = all(isinf(_43.xy));
26    }
27    else
28    {
29        _67 = false;
30    }
31    bool _75 = false;
32    if (_67)
33    {
34        _75 = all(isinf(_43.xyz));
35    }
36    else
37    {
38        _75 = false;
39    }
40    bool _81 = false;
41    if (_75)
42    {
43        _81 = all(isinf(_43));
44    }
45    else
46    {
47        _81 = false;
48    }
49    bool _87 = false;
50    if (_81)
51    {
52        _87 = !isinf(_56.x);
53    }
54    else
55    {
56        _87 = false;
57    }
58    bool _94 = false;
59    if (_87)
60    {
61        _94 = !any(isinf(_56.xy));
62    }
63    else
64    {
65        _94 = false;
66    }
67    bool _101 = false;
68    if (_94)
69    {
70        _101 = !any(isinf(_56.xyz));
71    }
72    else
73    {
74        _101 = false;
75    }
76    bool _107 = false;
77    if (_101)
78    {
79        _107 = !any(isinf(_56));
80    }
81    else
82    {
83        _107 = false;
84    }
85    float4 _108 = 0.0f.xxxx;
86    if (_107)
87    {
88        _108 = _7_colorGreen;
89    }
90    else
91    {
92        _108 = _7_colorRed;
93    }
94    return _108;
95}
96
97void frag_main()
98{
99    float2 _18 = 0.0f.xx;
100    sk_FragColor = main(_18);
101}
102
103SPIRV_Cross_Output main()
104{
105    frag_main();
106    SPIRV_Cross_Output stage_output;
107    stage_output.sk_FragColor = sk_FragColor;
108    return stage_output;
109}
110