Mesa (master): llvmpipe: Expect increased exp precision on Windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 14 09:28:27 UTC 2020


Module: Mesa
Branch: master
Commit: 69ffbcb16244fc4f1161dd4082eb93b7a80232e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=69ffbcb16244fc4f1161dd4082eb93b7a80232e5

Author: Daniel Stone <daniels at collabora.com>
Date:   Thu Apr 16 23:27:41 2020 +0100

llvmpipe: Expect increased exp precision on Windows

'Newer' versions of MSVCRT than 2013 appear to have fixed the bug around expf
precision which caused bb9e8c5090f0. It's not clear when this was
changed, but at least on Windows 10 machines with Visual Studio 2019,
expf behaves in line with other implementations.

As there is no clear way to test for the version of the VCRT in use,
simply mark this test as expected-pass rather than xfail.

Signed-off-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4946>

---

 src/gallium/drivers/llvmpipe/lp_test_arit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
index 184e50089f7..be8cb0afb48 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
@@ -468,9 +468,11 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned
          }
 
          if (test->ref == &expf && util_inf_sign(testval) == -1) {
-            /* XXX: 64bits MSVCRT's expf(-inf) returns -inf instead of 0 */
+            /* Some older 64-bit MSVCRT versions return -inf instead of 0
+	     * for expf(-inf). As detecting the VC runtime version is
+	     * non-trivial, just ignore the test result. */
 #if defined(_MSC_VER) && defined(_WIN64)
-            expected_pass = FALSE;
+            expected_pass = pass;
 #endif
          }
 



More information about the mesa-commit mailing list