diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-03-18 10:21:29 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-03-18 10:21:29 +0000 |
commit | 362f1418ec8cb8388c69df01e099c4e320b78691 (patch) | |
tree | 01789b97c407ebc19a7be71430f031e232b06086 | |
parent | 23aa870c9ceb79d1ea99e9c5a348b43d5e02c1b5 (diff) | |
parent | 5bdd20038b4bacce9c306d03ca9995cd6ceda97d (diff) | |
download | src-362f1418ec8cb8388c69df01e099c4e320b78691.tar.gz |
Merge from Chromium at DEPS revision 257591
This commit was generated by merge_to_master.py.
Change-Id: If3a36be510d743e9885ee4ae9fac82b46599e315
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 4 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_zoom.c | 8 |
3 files changed, 14 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 /*@}*/ diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 768bbba..cf9feb8 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -395,6 +395,10 @@ _swrast_write_zoomed_stencil_span(struct gl_context *ctx, GLint imgX, GLint imgY free(zoomedVals); } +// http://crbug.com/348397 +#ifdef _MSC_VER +#pragma optimize("", off) +#endif /** * Zoom/write 32-bit Z values. @@ -440,3 +444,7 @@ _swrast_write_zoomed_z_span(struct gl_context *ctx, GLint imgX, GLint imgY, free(zoomedVals); } + +#ifdef _MSC_VER +#pragma optimize("", off) +#endif |