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