summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Chromium Automerger <chromium-automerger@android>2014-02-22 02:04:34 +0000
committerAndroid Chromium Automerger <chromium-automerger@android>2014-02-22 02:04:34 +0000
commit4da7aee27669e21e727d892b753a0e8cad6c5ac3 (patch)
tree241f9266ee53bd28fb7959f97b62bd28383625ea
parent8601dbc0a249422397d70d700f7c4ddc2a1631df (diff)
parente510ef026f853574a76ff832d27b8292c03c707b (diff)
downloadsrc-4da7aee27669e21e727d892b753a0e8cad6c5ac3.tar.gz
Merge third_party/mesa/src from https://chromium.googlesource.com/chromium/deps/mesa.git at e510ef026f853574a76ff832d27b8292c03c707b
This commit was generated by merge_from_chromium.py. Change-Id: I703b3f85c160609a234473304384bdfe001674eb
-rw-r--r--src/gallium/auxiliary/util/u_math.h4
-rw-r--r--src/mesa/main/imports.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index 90b421e..05bb9e2 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -112,10 +112,13 @@ static INLINE float logf( float f )
#define logf(x) ((float)log((double)(x)))
#endif /* logf */
+#if _MSC_VER < 1800
#define isfinite(x) _finite((double)(x))
#define isnan(x) _isnan((double)(x))
+#endif /* _MSC_VER < 1800 */
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
+#if _MSC_VER < 1800
static INLINE double log2( double x )
{
const double invln2 = 1.442695041;
@@ -133,6 +136,7 @@ roundf(float x)
{
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
}
+#endif
#endif /* _MSC_VER */
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 4b74f70..827db2e 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -145,6 +145,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
#endif
#if defined(_MSC_VER)
+#if _MSC_VER < 1800 /* Not required on VS2013 and above. */
static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
static inline float exp2f(float x) { return powf(2.0f, x); }
static inline float log2f(float x) { return logf(x) * 1.442695041f; }
@@ -153,6 +154,7 @@ static inline float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
static inline float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
#define strtoll(p, e, b) _strtoi64(p, e, b)
+#endif /* _MSC_VER < 1800 */
#endif
/*@}*/