summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/glslang/src/Test/recurse1.frag
blob: 447a8827d6799b5bf51c8cedfbe57d524b07834c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#version 330 core

// cross-unit recursion

void main() {}

// two-level recursion

float cbar(int);

void cfoo(float)
{
	cbar(2);
}

// four-level, out of order

void CB();
void CD();
void CA() { CB(); }
void CC() { CD(); }

// high degree

void CBT();
void CDT();
void CAT() { CBT(); CBT(); CBT(); }
void CCT() { CDT(); CDT(); CBT(); }

// not recursive

void norA() {}
void norB() { norA(); }
void norC() { norA(); }
void norD() { norA(); }
void norE() { norB(); }
void norF() { norB(); }
void norG() { norE(); }
void norH() { norE(); }
void norI() { norE(); }

// not recursive, but with a call leading into a cycle if ignoring direction

void norcA() { }
void norcB() { norcA(); }
void norcC() { norcB(); }
void norcD() { norcC(); norcB(); } // head of cycle
void norcE() { norcD(); } // lead into cycle