summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2011-05-09 00:17:01 -0400
committerBrian Paul <[email protected]>2011-05-12 16:37:34 -0600
commitc5ac8a8aa2a9fe751453c1fcc8539b7dae5d473c (patch)
treec8062b45796751933f938bce095d0b9c3667e33a /src/gallium/auxiliary
parent48a0a096f878d1e627226eae520847063473b17f (diff)
Remove redundant util_unsigned_logbase2
util_logbase2 is exactly the same function. Signed-off-by: Matt Turner <[email protected]> Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c2
-rw-r--r--src/gallium/auxiliary/util/u_math.h12
2 files changed, 1 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 4636371a0f5..cb6717d7f63 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -1055,7 +1055,7 @@ lp_build_sample_partial_offset(struct lp_build_context *bld,
subcoord = LLVMBuildURem(builder, coord, block_width, "");
coord = LLVMBuildUDiv(builder, coord, block_width, "");
#else
- unsigned logbase2 = util_unsigned_logbase2(block_length);
+ unsigned logbase2 = util_logbase2(block_length);
LLVMValueRef block_shift = lp_build_const_int_vec(bld->gallivm, bld->type, logbase2);
LLVMValueRef block_mask = lp_build_const_int_vec(bld->gallivm, bld->type, block_length - 1);
subcoord = LLVMBuildAnd(builder, coord, block_mask, "");
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index ad2a1f835ca..2ecade5f7e4 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -414,18 +414,6 @@ unsigned ffs( unsigned u )
#endif
-/* Could also binary search for the highest bit.
- */
-static INLINE unsigned
-util_unsigned_logbase2(unsigned n)
-{
- unsigned log2 = 0;
- while (n >>= 1)
- ++log2;
- return log2;
-}
-
-
/**
* Return float bits.
*/