diff options
author | Brian Paul <[email protected]> | 2008-08-22 15:25:21 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-22 15:25:21 -0600 |
commit | 1a46dcc8a927dfb38ca1381e7b3dafb789f8257c (patch) | |
tree | 2f8fdae0e1e2858b73ca012f485777362792778e /src/gallium/include | |
parent | 1c2ff4d9e65563c071747a9c3bd907bd24706da0 (diff) |
gallium: replace LOG2() macro with util_fast_log2() inline func
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_util.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h index 473a8d94abb..660192b28e7 100644 --- a/src/gallium/include/pipe/p_util.h +++ b/src/gallium/include/pipe/p_util.h @@ -443,21 +443,6 @@ static INLINE int iround(float f) #define FABSF(x) ((float) fabs(x)) #endif -/* Pretty fast, and accurate. - * Based on code from http://www.flipcode.com/totd/ - */ -static INLINE float LOG2(float val) -{ - union fi num; - int log_2; - - num.f = val; - log_2 = ((num.i >> 23) & 255) - 128; - num.i &= ~(255 << 23); - num.i += 127 << 23; - num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; - return num.f + log_2; -} #if defined(__GNUC__) #define CEILF(x) ceilf(x) |