Make ARB_shader_precision tests ignore 0.0 vs -0.0.
The multiplication precision tests were attempting to multiply 0.0 * -0.1 and expecting to get +0.0 (0x00000000), and failing if they received -0.0 (0x80000000). This seems fairly bogus. According to the ARB_shader_precision specification: "In general, correct signedness of 0 is not required." To avoid this problem, remove the sign bit from both the results and expected values when the value is equal to (+/-) 0.0. v2: Use xs.dtype.type(0.0) (suggested by Dylan Baker). Signed-off-by: Kenneth Graunke <firstname.lastname@example.org> Reviewed-by: Dylan Baker <email@example.com> Acked-by: Matt Turner <firstname.lastname@example.org>
Showing with 13 additions and 7 deletions