1#version 450
2
3out vec4  outf4;
4in flat ivec4  ini4;
5in float  inf;
6
7float 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
16float 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
26void main()
27{
28    outf4 = vec4(Test1(int(inf)) +
29                 Test2(int(inf)));
30}
31