Mesa (master): util: fix SSE-version needed for double opcodes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 2 14:45:02 UTC 2019


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Sun Sep  1 10:05:12 2019 +0200

util: fix SSE-version needed for double opcodes

This code generates CVTSD2SI, which requires SSE2. So let's fix the
required SSE-version.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Fixes: 5de29ae (util: try to use SSE instructions with MSVC and 32-bit gcc)
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/util/rounding.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/rounding.h b/src/util/rounding.h
index fd343ab929b..8e302921c9d 100644
--- a/src/util/rounding.h
+++ b/src/util/rounding.h
@@ -116,7 +116,7 @@ _mesa_lroundevenf(float x)
 static inline long
 _mesa_lroundeven(double x)
 {
-#if defined(__SSE__) || defined(_MSC_VER)
+#if defined(__SSE2__) || defined(_MSC_VER)
 #if LONG_MAX == INT64_MAX
    return _mm_cvtsd_si64(_mm_load_sd(&x));
 #elif LONG_MAX == INT32_MAX




More information about the mesa-commit mailing list