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