Mesa (master): glsl: Remove MSVC implementations of copysign and isnormal.

Matt Turner mattst88 at kemper.freedesktop.org
Wed Jul 29 16:32:06 UTC 2015


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Wed Jul 15 20:54:46 2015 -0700

glsl: Remove MSVC implementations of copysign and isnormal.

Non-Gallium parts of Mesa require MSVC 2013 which provides these.

---

 src/glsl/ir_constant_expression.cpp      |   14 +-------------
 src/glsl/nir/nir_constant_expressions.py |   14 +-------------
 2 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 171b8e9..7a38fa4 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -40,12 +40,7 @@
 #include "glsl_types.h"
 #include "program/hash_table.h"
 
-#if defined(_MSC_VER) && (_MSC_VER < 1800)
-static int isnormal(double x)
-{
-   return _fpclass(x) == _FPCLASS_NN || _fpclass(x) == _FPCLASS_PN;
-}
-#elif defined(__SUNPRO_CC) && !defined(isnormal)
+#if defined(__SUNPRO_CC) && !defined(isnormal)
 #include <ieeefp.h>
 static int isnormal(double x)
 {
@@ -53,13 +48,6 @@ static int isnormal(double x)
 }
 #endif
 
-#if defined(_MSC_VER)
-static double copysign(double x, double y)
-{
-   return _copysign(x, y);
-}
-#endif
-
 static float
 dot_f(ir_constant *op0, ir_constant *op1)
 {
diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
index bf82fe5..8fd9b10 100644
--- a/src/glsl/nir/nir_constant_expressions.py
+++ b/src/glsl/nir/nir_constant_expressions.py
@@ -31,12 +31,7 @@ template = """\
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "nir_constant_expressions.h"
 
-#if defined(_MSC_VER) && (_MSC_VER < 1800)
-static int isnormal(double x)
-{
-   return _fpclass(x) == _FPCLASS_NN || _fpclass(x) == _FPCLASS_PN;
-}
-#elif defined(__SUNPRO_CC)
+#if defined(__SUNPRO_CC)
 #include <ieeefp.h>
 static int isnormal(double x)
 {
@@ -44,13 +39,6 @@ static int isnormal(double x)
 }
 #endif
 
-#if defined(_MSC_VER)
-static double copysign(double x, double y)
-{
-   return _copysign(x, y);
-}
-#endif
-
 /**
  * Evaluate one component of packSnorm4x8.
  */




More information about the mesa-commit mailing list