perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.30 / execution / clipping / vs-clip-distance-const-reject.shader_test
blob059589a9c37ca16dabd2dba9f6ba054a2e494069
1 # From the GL 3.0 spec, section 2.17 (Clipping):
3 #   A vertex shader may, instead of writing to gl ClipVertex, write a
4 #   single clip distance for each supported clip plane to elements of
5 #   the gl ClipDistance[] array. The half-space corresponding to clip
6 #   plane n is then given by the set of points satisfying the
7 #   inequality
9 #     c_n(P) >= 0
11 #   where c_n(P) is the value of clip distance n at point P.
13 # This test checks that gl_ClipDistance works properly for the trivial
14 # case where gl_ClipDistance[0] is a constant value less than zero.
16 [require]
17 GLSL >= 1.30
19 [vertex shader]
20 #version 130
21 void main(void)
23         gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
25         gl_ClipDistance[0] = -1.0;
28 [fragment shader]
29 #version 130
30 void main(void)
32         gl_FragColor = vec4(1.0);
35 [test]
36 clear color 0.0 0.0 0.0 0.0
37 clear
38 enable GL_CLIP_PLANE0
39 draw rect -1 -1 2 2
40 probe all rgba 0.0 0.0 0.0 0.0