1 # This test verifies that a geometry shader can redeclare just the
2 # gl_PerVertex input block, but still use members of the gl_PerVertex
3 # output block (whether or not those members were included in the
4 # redeclaration of the input block).
10 in vec4 piglit_vertex;
17 gl_Position = piglit_vertex;
22 layout(triangle_strip, max_vertices = 3) out;
30 for (int i = 0; i < 3; i++) {
31 gl_Position = gl_in[i].gl_Position;
32 gl_ClipDistance[0] = 1.0;
40 if (gl_ClipDistance[0] == 1.0)
41 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
43 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
47 # Since the fragment shader's gl_ClipDistance array is only defined
48 # for elements that have clipping enabled, we need to enable clip
49 # plane 0. Fortunately the values we use for gl_ClipDistance are
50 # always positive, so no pixels are actually clipped.
52 clear color 0.0 0.0 0.0 0.0
55 probe all rgba 0.0 1.0 0.0 1.0