xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/IntBitsToFloat.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    int4 expectedB = int4(1065353216, 1073741824, -1069547520, -1065353216);
21    bool _62 = false;
22    if (_39.x == asfloat(1065353216))
23    {
24        float2 _55 = _39.xy;
25        float2 _56 = asfloat(int4(1065353216, 1073741824, -1069547520, -1065353216).xy);
26        _62 = all(bool2(_55.x == _56.x, _55.y == _56.y));
27    }
28    else
29    {
30        _62 = false;
31    }
32    bool _73 = false;
33    if (_62)
34    {
35        float3 _65 = _39.xyz;
36        float3 _67 = asfloat(int4(1065353216, 1073741824, -1069547520, -1065353216).xyz);
37        _73 = all(bool3(_65.x == _67.x, _65.y == _67.y, _65.z == _67.z));
38    }
39    else
40    {
41        _73 = false;
42    }
43    bool _80 = false;
44    if (_73)
45    {
46        float4 _76 = asfloat(int4(1065353216, 1073741824, -1069547520, -1065353216));
47        _80 = all(bool4(_39.x == _76.x, _39.y == _76.y, _39.z == _76.z, _39.w == _76.w));
48    }
49    else
50    {
51        _80 = false;
52    }
53    float4 _81 = 0.0f.xxxx;
54    if (_80)
55    {
56        _81 = _7_colorGreen;
57    }
58    else
59    {
60        _81 = _7_colorRed;
61    }
62    return _81;
63}
64
65void frag_main()
66{
67    float2 _18 = 0.0f.xx;
68    sk_FragColor = main(_18);
69}
70
71SPIRV_Cross_Output main()
72{
73    frag_main();
74    SPIRV_Cross_Output stage_output;
75    stage_output.sk_FragColor = sk_FragColor;
76    return stage_output;
77}
78