perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.30 / execution / fs-texture-sampler2dshadow-10.shader_test
blob563811d9b3bc1fbfe37baa7f9834c5253b702ba1
1 # [description]
2 # Test texture(sampler2DShadow, vec3) with
3 #   - depth texture mode = alpha
4 #   - texture compare func = greater
6 [require]
7 GLSL >= 1.30
9 [vertex shader]
10 #version 130
11 out vec4 tex_coord;
12 void main() {
13         gl_Position = gl_Vertex;
14         tex_coord = (gl_Vertex + 1.0) / 2.0;
17 [fragment shader]
18 #version 130
19 const float canary = 0.125;
20 uniform sampler2DShadow tex;
21 in vec4 tex_coord;
22 void main() {
23         float s = texture(tex, tex_coord.xyy);
24         gl_FragColor = vec4(s, canary, canary, canary);
27 [test]
28 uniform int tex 0
29 texture shadow2D 0 (32, 32)
30 texparameter 2D depth_mode alpha
31 texparameter 2D compare_func greater
32 draw rect -1 -1 2 2
34 # depth comparison pass
35 relative probe rgba (0.0, 0.1) (1.0, 0.125, 0.125, 0.125);
36 relative probe rgba (0.9, 1.0) (1.0, 0.125, 0.125, 0.125);
38 # depth comparison fail
39 relative probe rgba (0.1, 0.0) (0.0, 0.125, 0.125, 0.125);
40 relative probe rgba (1.0, 0.9) (0.0, 0.125, 0.125, 0.125);