From: Michal Krol Date: Wed, 12 Nov 2008 16:14:07 +0000 (+0100) Subject: util: Add log2() definition for MSC. X-Git-Tag: mesa-7.8~4139^2~390^2~195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f447eea4de9cab5de295c717d35824cf92b9f322;p=platform%2Fupstream%2Fmesa.git util: Add log2() definition for MSC. --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index be7303e..c7bbebc 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -161,6 +161,11 @@ static INLINE float logf( float f ) return (float) log( (double) f ); } +static INLINE double log2( double x ) +{ + return log( x ) / log( 2.0 ); +} + #else /* Work-around an extra semi-colon in VS 2005 logf definition */ #ifdef logf