1 # simple test using one shader subroutine.
4 GL_ARB_shader_subroutine
8 #extension GL_ARB_shader_subroutine: enable
10 in vec4 piglit_vertex;
12 subroutine vec4 getcolor();
13 subroutine uniform getcolor GetColor;
18 return vec4(1.0, 0.0, 0.0, 1.0);
24 return vec4(0.0, 1.0, 0.0, 1.0);
29 gl_Position = piglit_vertex;
45 clear color 0.0 0.0 1.0 0.0
47 subuniform GL_VERTEX_SHADER GetColor color_red
49 probe all rgba 1.0 0.0 0.0 1.0
50 subuniform GL_VERTEX_SHADER GetColor color_green
52 probe all rgba 0.0 1.0 0.0 1.0