1# Tests that triangles coming out of the TES in point_mode don't get rasterized
2# as triangles when drawing in GL_NV_fill_rectangle mode
3[require]
4GLSL >= 1.50
5GL_NV_fill_rectangle
6GL_ARB_tessellation_shader
7
8[vertex shader passthrough]
9
10[tessellation evaluation shader]
11#extension GL_ARB_tessellation_shader: require
12layout(triangles, point_mode) in;
13
14void main()
15{
16	gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
17	            + gl_in[1].gl_Position * gl_TessCoord[1]
18	            + gl_in[2].gl_Position * gl_TessCoord[2];
19	gl_PointSize = 5.0;
20}
21
22[fragment shader]
23void main()
24{
25	gl_FragColor = vec4(0, 1, 0, 1);
26}
27
28[vertex data]
29piglit_vertex/float/3
30 0.0  1.0  0.0
31 1.0 -1.0  0.0
32-1.0 -1.0  0.0
33
34[test]
35clear color 0.2 0.2 0.2 0.2
36clear
37
38enable GL_PROGRAM_POINT_SIZE
39polygon mode GL_FRONT_AND_BACK GL_FILL_RECTANGLE_NV
40draw arrays GL_PATCHES 0 3
41
42probe rgb  0  0 0.0 1.0 0.0
43probe rgb 15 15 0.2 0.2 0.2
44