From 6c0c95d6045d2d2b4e6a3a2f11457850031c57bc Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Aug 2014 21:55:11 +0200 Subject: fontconfig libxcb/xcb-proto mesa xkeyboard-config git update 22 Aug 2014 libxcb/xcb-proto commit 8e3db42d67a0035bb16d16da28bd5eea7a269178 xkeyboard-config commit 10fce2c2baae471795d069f3a5f1307eedb9ff0a fontconfig commit 286cdc9c10b0453c25950103b6a1f7170d15bfdc mesa commit 97d03b9366bfa55b27feb92aa5afacd9c5f6f421 --- mesalib/src/gallium/auxiliary/util/u_math.h | 62 +++++++++++------------------ 1 file changed, 23 insertions(+), 39 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/util/u_math.h') diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h index 2823e0570..25bcfb57d 100644 --- a/mesalib/src/gallium/auxiliary/util/u_math.h +++ b/mesalib/src/gallium/auxiliary/util/u_math.h @@ -61,46 +61,46 @@ extern "C" { #endif -#if defined(_MSC_VER) +#if defined(_MSC_VER) #if _MSC_VER < 1400 && !defined(__cplusplus) - -static INLINE float cosf( float f ) + +static INLINE float cosf( float f ) { return (float) cos( (double) f ); } -static INLINE float sinf( float f ) +static INLINE float sinf( float f ) { return (float) sin( (double) f ); } -static INLINE float ceilf( float f ) +static INLINE float ceilf( float f ) { return (float) ceil( (double) f ); } -static INLINE float floorf( float f ) +static INLINE float floorf( float f ) { return (float) floor( (double) f ); } -static INLINE float powf( float f, float g ) +static INLINE float powf( float f, float g ) { return (float) pow( (double) f, (double) g ); } -static INLINE float sqrtf( float f ) +static INLINE float sqrtf( float f ) { return (float) sqrt( (double) f ); } -static INLINE float fabsf( float f ) +static INLINE float fabsf( float f ) { return (float) fabs( (double) f ); } -static INLINE float logf( float f ) +static INLINE float logf( float f ) { return (float) log( (double) f ); } @@ -149,28 +149,6 @@ roundf(float x) #endif /* _MSC_VER */ -#ifdef PIPE_OS_ANDROID - -static INLINE -double log2(double d) -{ - return log(d) * (1.0 / M_LN2); -} - -/* workaround a conflict with main/imports.h */ -#ifdef log2f -#undef log2f -#endif - -static INLINE -float log2f(float f) -{ - return logf(f) * (float) (1.0 / M_LN2); -} - -#endif - - #if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || defined(_MSC_VER)) static INLINE long int lrint(double d) @@ -258,7 +236,8 @@ union di { * Extract the IEEE float32 exponent. */ static INLINE signed -util_get_float32_exponent(float x) { +util_get_float32_exponent(float x) +{ union fi f; f.f = x; @@ -558,7 +537,8 @@ unsigned ffs( unsigned u ) * Find last bit set in a word. The least significant bit is 1. * Return 0 if no bits are set. */ -static INLINE unsigned util_last_bit(unsigned u) +static INLINE unsigned +util_last_bit(unsigned u) { #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) return u == 0 ? 0 : 32 - __builtin_clz(u); @@ -577,7 +557,8 @@ static INLINE unsigned util_last_bit(unsigned u) * significant bit is 1. * Return 0 if no bits are set. */ -static INLINE unsigned util_last_bit_signed(int i) +static INLINE unsigned +util_last_bit_signed(int i) { #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER) return 31 - __builtin_clrsb(i); @@ -595,9 +576,10 @@ static INLINE unsigned util_last_bit_signed(int i) * int i = u_bit_scan(&mymask); * ... process element i * } - * + * */ -static INLINE int u_bit_scan(unsigned *mask) +static INLINE int +u_bit_scan(unsigned *mask) { int i = ffs(*mask) - 1; *mask &= ~(1 << i); @@ -907,12 +889,14 @@ do { \ #endif -static INLINE uint32_t util_unsigned_fixed(float value, unsigned frac_bits) +static INLINE uint32_t +util_unsigned_fixed(float value, unsigned frac_bits) { return value < 0 ? 0 : (uint32_t)(value * (1<