perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / glsl-1.30 / execution / fs-isinf-vec3.shader_test
blob49b04b2ac8c109199ef34a57621de0dd0a2e881a
1 # Test proper behavior of the isinf(vec3) 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 vec3 multiplier;
22 uniform vec3 exponent;
24 void main()
26   gl_FragColor = vec4(isinf(multiplier*exp(exponent)), 1.0);
29 [test]
30 uniform vec3 multiplier 1.0 1.0 -1.0
31 uniform vec3 exponent 1.0 1000.0 1000.0
32 draw rect -1 -1 2 2
33 probe rgba 0 0 0.0 1.0 1.0 1.0
34 uniform vec3 multiplier -1.0 -1.0 1.0
35 uniform vec3 exponent 1000.0 1.0 1.0
36 draw rect -1 -1 2 2
37 probe rgba 1 0 1.0 0.0 0.0 1.0