Add function recursion testing to the link-time validation.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23309 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-10-01 21:58:43 +00:00
parent f2ee3dd46a
commit 2ecdd14288
10 changed files with 469 additions and 25 deletions

44
Test/recurse1.vert Normal file
View File

@@ -0,0 +1,44 @@
#version 330 core
void main() {}
float bar(int);
// direct recursion
void self()
{
self();
}
// two-level recursion
void foo(float)
{
bar(2);
}
float bar(int)
{
foo(4.2);
return 3.2;
}
// four-level, out of order
void B();
void D();
void A() { B(); }
void C() { D(); }
void B() { C(); }
void D() { A(); }
// high degree
void BT();
void DT();
void AT() { BT(); BT(); BT(); }
void CT() { DT(); AT(); DT(); BT(); }
void BT() { CT(); CT(); CT(); }
void DT() { AT(); }