perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.30 / execution / vs-isinf-vec2.shader_test
blobb253ff9fb5fc0d24526eb6fd25e5c38af8d9dad5
1 # Test proper behavior of the isinf(vec2) function.
3 # Note: testing behavior if isinf() is challenging because the GLSL
4 # 1.30 spec does not explicitly define any circumstances under which
5 # infinite values are required to be generated.  This test assumes
6 # that the expressions 1.0*exp(1000.0) and -1.0*exp(1000.0) produce
7 # infinite values when evaluated in the shader.
9 [require]
10 GLSL >= 1.30
12 [vertex shader]
13 #version 130
14 uniform vec2 multiplier;
15 uniform vec2 exponent;
17 void main()
19   gl_Position = gl_Vertex;
20   gl_FrontColor = vec4(isinf(multiplier*exp(exponent)), 0.0, 1.0);
23 [fragment shader]
24 #version 130
25 void main()
27   gl_FragColor = gl_Color;
30 [test]
31 uniform vec2 multiplier 1.0 1.0
32 uniform vec2 exponent 1.0 1000.0
33 draw rect -1 -1 2 2
34 probe rgba 0 0 0.0 1.0 0.0 1.0
35 uniform vec2 multiplier -1.0 -1.0
36 uniform vec2 exponent 1000.0 1.0
37 draw rect -1 -1 2 2
38 probe rgba 1 0 1.0 0.0 0.0 1.0