• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _15_colorGreen : packoffset(c0);
4    float4 _15_colorRed : packoffset(c1);
5};
6
7
8static float4 sk_FragColor;
9
10struct SPIRV_Cross_Output
11{
12    float4 sk_FragColor : SV_Target0;
13};
14
15static int scratchVar = 0;
16
17bool test_flat_b()
18{
19    return true;
20}
21
22bool test_if_b()
23{
24    if (_15_colorGreen.y > 0.0f)
25    {
26        return true;
27    }
28    else
29    {
30        scratchVar++;
31    }
32    scratchVar++;
33    return false;
34}
35
36bool test_else_b()
37{
38    if (_15_colorGreen.y == 0.0f)
39    {
40        return false;
41    }
42    else
43    {
44        return true;
45    }
46}
47
48bool test_loop_if_b()
49{
50    for (int x = 0; x <= 1; x++)
51    {
52        if (_15_colorGreen.y == 0.0f)
53        {
54            return false;
55        }
56        else
57        {
58            return true;
59        }
60    }
61    scratchVar++;
62    return true;
63}
64
65float4 main(float2 _77)
66{
67    scratchVar = 0;
68    bool _83 = false;
69    if (test_flat_b())
70    {
71        bool _82 = test_if_b();
72        _83 = _82;
73    }
74    else
75    {
76        _83 = false;
77    }
78    bool _87 = false;
79    if (_83)
80    {
81        _87 = test_else_b();
82    }
83    else
84    {
85        _87 = false;
86    }
87    bool _91 = false;
88    if (_87)
89    {
90        bool _90 = test_loop_if_b();
91        _91 = _90;
92    }
93    else
94    {
95        _91 = false;
96    }
97    float4 _92 = 0.0f.xxxx;
98    if (_91)
99    {
100        _92 = _15_colorGreen;
101    }
102    else
103    {
104        _92 = _15_colorRed;
105    }
106    return _92;
107}
108
109void frag_main()
110{
111    float2 _25 = 0.0f.xx;
112    float4 _27 = main(_25);
113    sk_FragColor = _27;
114}
115
116SPIRV_Cross_Output main()
117{
118    frag_main();
119    SPIRV_Cross_Output stage_output;
120    stage_output.sk_FragColor = sk_FragColor;
121    return stage_output;
122}
123