xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/FloatBitsToUint.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 _39 = float4(_7_testMatrix2x2[0].x, _7_testMatrix2x2[0].y, _7_testMatrix2x2[1].x, _7_testMatrix2x2[1].y) * float4(1.0f, 1.0f, -1.0f, -1.0f);
19    float4 inputVal = _39;
20    bool _57 = false;
21    if (asuint(_39.x) == 1065353216u)
22    {
23        uint2 _49 = asuint(_39.xy);
24        _57 = all(bool2(_49.x == uint2(1065353216u, 1073741824u).x, _49.y == uint2(1065353216u, 1073741824u).y));
25    }
26    else
27    {
28        _57 = false;
29    }
30    bool _69 = false;
31    if (_57)
32    {
33        uint3 _60 = asuint(_39.xyz);
34        _69 = all(bool3(_60.x == uint3(1065353216u, 1073741824u, 3225419776u).x, _60.y == uint3(1065353216u, 1073741824u, 3225419776u).y, _60.z == uint3(1065353216u, 1073741824u, 3225419776u).z));
35    }
36    else
37    {
38        _69 = false;
39    }
40    bool _79 = false;
41    if (_69)
42    {
43        uint4 _72 = asuint(_39);
44        _79 = all(bool4(_72.x == uint4(1065353216u, 1073741824u, 3225419776u, 3229614080u).x, _72.y == uint4(1065353216u, 1073741824u, 3225419776u, 3229614080u).y, _72.z == uint4(1065353216u, 1073741824u, 3225419776u, 3229614080u).z, _72.w == uint4(1065353216u, 1073741824u, 3225419776u, 3229614080u).w));
45    }
46    else
47    {
48        _79 = false;
49    }
50    float4 _80 = 0.0f.xxxx;
51    if (_79)
52    {
53        _80 = _7_colorGreen;
54    }
55    else
56    {
57        _80 = _7_colorRed;
58    }
59    return _80;
60}
61
62void frag_main()
63{
64    float2 _18 = 0.0f.xx;
65    sk_FragColor = main(_18);
66}
67
68SPIRV_Cross_Output main()
69{
70    frag_main();
71    SPIRV_Cross_Output stage_output;
72    stage_output.sk_FragColor = sk_FragColor;
73    return stage_output;
74}
75