4 // require_extensions: GL_ARB_shader_subroutine
9 #extension GL_ARB_shader_subroutine: require
11 /* Two mutually-recursive subroutines */
13 subroutine void func_type_a(int x);
14 subroutine void func_type_b(int x);
16 subroutine uniform func_type_a func_a;
17 subroutine uniform func_type_b func_b;
19 subroutine (func_type_a) void impl_a(int x) {
20 if (x > 0) func_b(x - 1);
23 subroutine (func_type_b) void impl_b(int x) {
24 if (x > 0) func_a(x - 1);