1 # two subroutines, once calls into the other.
2 # ensure a subroutine calling a subroutine
3 # before all members have been parsed
5 # Initial mesa implementation generated
6 # the lowered call too early.
10 GL_ARB_shader_subroutine
12 [vertex shader passthrough]
16 #extension GL_ARB_shader_subroutine: enable
21 subroutine float getchan1();
22 subroutine uniform getchan1 GetChan1;
24 subroutine float getchan2();
25 subroutine uniform getchan2 GetChan2;
53 color = vec4(GetChan1(), GetChan2(), myin, 1.0);
58 clear color 0.0 0.0 1.0 0.0
60 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_full
61 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_empty
62 uniform float myin 1.0
64 probe all rgba 1.0 0.0 1.0 1.0
65 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_empty
66 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_full
67 uniform float myin 1.0
69 probe all rgba 0.0 0.0 1.0 1.0