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).
*/
-static int
-logbase2(int n)
-{
- GLint i = 1;
- GLint log2 = 0;
-
- while (n > i) {
- i *= 2;
- log2++;
- }
-
- return log2;
-}
-
/* Otherwise, store it in memory if (Border != 0) or (any dimension ==
* 1).
(intel->gen < 4 || firstLevel == 0)) {
lastLevel = firstLevel;
} else {
- lastLevel = firstLevel + logbase2(MAX2(MAX2(width, height), depth));
+ lastLevel = firstLevel + _mesa_logbase2(MAX2(MAX2(width, height), depth));
}
}
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 )
{
}
assert(texImage->RowStride == postConvWidth);
- viaImage->pitchLog2 = logbase2(postConvWidth * texelBytes);
+ viaImage->pitchLog2 = _mesa_logbase2(postConvWidth * texelBytes);
/* allocate memory */
if (_mesa_is_format_compressed(texImage->TexFormat))