xref: /aosp_15_r20/external/skia/tests/sksl/shared/ConstantIf.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _7_colorGreen : packoffset(c0);
4    float4 _7_colorRed : packoffset(c1);
5};
6
7
8static float4 sk_FragColor;
9
10struct SPIRV_Cross_Output
11{
12    float4 sk_FragColor : SV_Target0;
13};
14
15float4 main(float2 _21)
16{
17    int a = 0;
18    int b = 0;
19    int c = 0;
20    int d = 0;
21    a = 1;
22    b = 2;
23    c = 5;
24    bool _38 = false;
25    if (true)
26    {
27        _38 = true;
28    }
29    else
30    {
31        _38 = false;
32    }
33    bool _41 = false;
34    if (_38)
35    {
36        _41 = true;
37    }
38    else
39    {
40        _41 = false;
41    }
42    bool _44 = false;
43    if (_41)
44    {
45        _44 = true;
46    }
47    else
48    {
49        _44 = false;
50    }
51    float4 _45 = 0.0f.xxxx;
52    if (_44)
53    {
54        _45 = _7_colorGreen;
55    }
56    else
57    {
58        _45 = _7_colorRed;
59    }
60    return _45;
61}
62
63void frag_main()
64{
65    float2 _17 = 0.0f.xx;
66    sk_FragColor = main(_17);
67}
68
69SPIRV_Cross_Output main()
70{
71    frag_main();
72    SPIRV_Cross_Output stage_output;
73    stage_output.sk_FragColor = sk_FragColor;
74    return stage_output;
75}
76