From: Nicolai Hähnle <[email protected]> ldexp(0.5, -1028) will be different from 0.0 on implementations that support denorms. Simply crank up the exponents to exclude the possibility of denorms. --- .../execution/built-in-functions/fs-ldexp-dvec4.shader_test | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test index c0e60b97b..38214dee6 100644 --- a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test +++ b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test @@ -85,25 +85,21 @@ probe rgba 4 0 0.0 0.0 0.0 0.0 # Test DBL_MIN (2.2250738585072014E-308) and DBL_MAX (1.7976931348623157E+308) as inputs. uniform dvec4 expected_double 0.5 -0.5 0.99999999999999989 -0.99999999999999989 uniform dvec4 given_double 2.2250738585072014E-308 -2.2250738585072014E-308 1.7976931348623157E+308 -1.7976931348623157E+308 uniform ivec4 given_exponent 1021 1021 -1024 -1024 draw arrays GL_TRIANGLE_FAN 0 4 probe rgba 5 0 0.0 0.0 0.0 0.0 # Test underflow generates zero with sign of x. uniform dvec4 expected_double 0.0 -0.0 0.0 -0.0 uniform dvec4 given_double 0.0 -0.0 0.5 -0.5 -uniform ivec4 given_exponent -1028 -1028 -1028 -1028 +uniform ivec4 given_exponent -1028 -1028 -1078 -1078 draw arrays GL_TRIANGLE_FAN 0 4 probe rgba 6 0 0.0 0.0 0.0 0.0 uniform dvec4 expected_double 0.0 -0.0 0.0 -0.0 uniform dvec4 given_double 2.2250738585072014E-308 -2.2250738585072014E-308 1.7976931348623157E+308 -1.7976931348623157E+308 -# For the FLT_MAX case -255 comes from (-127 + -127 + -1). -# ldexp(FLT_MAX, -127) = 0x1.fffffep+0 (1.999999881) -# ldexp(FLT_MAX, -127 - 127) = 0x1p-126 (epsilon above FLT_MIN) -# ldexp(FLT_MAX, -127 - 127 - 1) = 0.0 -uniform ivec4 given_exponent -1 -1 -2048 -2048 +uniform ivec4 given_exponent -53 -53 -2100 -2100 draw arrays GL_TRIANGLE_FAN 0 4 probe rgba 7 0 0.0 0.0 0.0 0.0 # Overflow is undefined according to the GLSL spec, so nothing to test. -- 2.11.0 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
