1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
  
     | 
    
      [require]
GLSL >= 1.50
GL_ARB_tessellation_shader
[vertex shader passthrough]
[tessellation control shader]
#extension GL_ARB_tessellation_shader: require
layout(vertices = 3) out;
void main() {
	gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
	gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
	gl_TessLevelInner = float[2](0.0, 0.0);
}
[tessellation evaluation shader]
#extension GL_ARB_tessellation_shader: require
layout(triangles) in;
out vec4 color_fs;
void main() {
	gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
	            + gl_in[1].gl_Position * gl_TessCoord[1]
	            + gl_in[2].gl_Position * gl_TessCoord[2];
	color_fs = vec4(0, 1, 0, 1);
}
[fragment shader]
in vec4 color_fs;
void main()
{
	gl_FragColor = color_fs;
}
[vertex data]
piglit_vertex/float/2
-1.0 -1.0
 1.0 -1.0
-1.0  1.0
-1.0  1.0
 1.0 -1.0
 1.0  1.0
[test]
clear color 0.1 0.1 0.1 0.1
clear
patch parameter vertices 3
draw arrays GL_PATCHES 0 6
probe all rgba 0.0 1.0 0.0 1.0
 
     |