3 GL_MESA_shader_integer_functions
6 #extension GL_MESA_shader_integer_functions : enable
11 uniform vec4 given_float;
12 uniform vec4 expected_mantissa;
13 uniform ivec4 expected_exponent;
16 gl_Position = piglit_vertex;
18 /* Green if both pass. */
19 color = vec4(0.0, 1.0, 0.0, 1.0);
24 mantissa = frexp(given_float, exponent);
26 if (mantissa != expected_mantissa) {
30 if (exponent != expected_exponent) {
45 uniform vec4 given_float 0.0 -0.0 0.5 -0.5
46 uniform vec4 expected_mantissa 0.0 -0.0 0.5 -0.5
47 uniform ivec4 expected_exponent 0 0 0 0
49 probe all rgba 0.0 1.0 0.0 1.0
51 uniform vec4 given_float 0.49 1.0 25.0 100
52 uniform vec4 expected_mantissa 0.98 0.5 0.78125 0.78125
53 uniform ivec4 expected_exponent -1 1 5 7
55 probe all rgba 0.0 1.0 0.0 1.0
57 uniform vec4 given_float 1.1754944e-38 -1.1754944e-38 3.40282347e38 -3.40282347e38
58 uniform vec4 expected_mantissa 0.5 -0.5 0.999999940 -0.999999940
59 uniform ivec4 expected_exponent -125 -125 128 128
61 probe all rgba 0.0 1.0 0.0 1.0