Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git] / Test / remap.similar_1b.everything.frag
1 #version 450
2
3 out vec4  outf4;
4 in flat ivec4  ini4;
5 in float  inf;
6
7 float Test1(int bound)
8 {
9     float r = 0;
10     for (int x=0; x<bound; ++x)
11         r += 0.5;
12     r += 0.2;
13     return r;
14 }
15
16 float Test2(int bound)
17 {
18     if (bound > 2) {
19         return Test1(bound * 2);
20     } else
21         return float(bound * 4 +
22                      ini4.y * ini4.z +
23                      ini4.x);
24 }
25
26 void main()
27 {
28     outf4 = vec4(Test1(int(inf)) + 
29                  Test2(int(inf)));
30 }