perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.30 / execution / fs-isinf-vec2.shader_test
blob7399728afb07fb06dc5c4deee3dcc88d860e6bfd
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 void main()
16   gl_Position = gl_Vertex;
19 [fragment shader]
20 #version 130
21 uniform vec2 multiplier;
22 uniform vec2 exponent;
24 void main()
26   gl_FragColor = vec4(isinf(multiplier*exp(exponent)), 0.0, 1.0);
29 [test]
30 uniform vec2 multiplier 1.0 1.0
31 uniform vec2 exponent 1.0 1000.0
32 draw rect -1 -1 2 2
33 probe rgba 0 0 0.0 1.0 0.0 1.0
34 uniform vec2 multiplier -1.0 -1.0
35 uniform vec2 exponent 1000.0 1.0
36 draw rect -1 -1 2 2
37 probe rgba 1 0 1.0 0.0 0.0 1.0