summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2011-06-09 00:47:19 +0200
committerRoland Scheidegger <[email protected]>2011-06-09 01:14:51 +0200
commitc1090f3019bbe0ff92455e4a9268f8957af9cda0 (patch)
tree6d53118a4ad366b8fbcfa8d842e3a67c125c5484 /src/mesa/drivers/dri/unichrome
parentda009212fe121206a67cb65ca8f88777a9f7e44f (diff)
mesa: get rid of homegrown logbase2 implementation in drivers
Some of the logbase2 functions did just the same as _mesa_logbase2, though they were taking signed numbers (but it shouldn't matter for them).
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 1a0d1eaf070..fe5480ff25c 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -196,18 +196,6 @@ viaChooseTexFormat( struct gl_context *ctx, GLint internalFormat,
return MESA_FORMAT_NONE; /* never get here */
}
-static int logbase2(int n)
-{
- GLint i = 1;
- GLint log2 = 0;
-
- while (n > i) {
- i *= 2;
- log2++;
- }
-
- return log2;
-}
static const char *get_memtype_name( GLint memType )
{
@@ -690,7 +678,7 @@ static void viaTexImage(struct gl_context *ctx,
}
assert(texImage->RowStride == postConvWidth);
- viaImage->pitchLog2 = logbase2(postConvWidth * texelBytes);
+ viaImage->pitchLog2 = _mesa_logbase2(postConvWidth * texelBytes);
/* allocate memory */
if (_mesa_is_format_compressed(texImage->TexFormat))