mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40:06 +00:00
2ecdd14288
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23309 e7fa87d3-cd2b-0410-9028-fcbf551c1848
45 lines
527 B
GLSL
45 lines
527 B
GLSL
#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(); }
|