#include "util/u_atomic.h"
#include "util/u_inlines.h"
+#include "util/u_math.h"
#include "hud/hud_context.h"
{
const int xclass = v->visualType;
if (xclass == GLX_TRUE_COLOR || xclass == GLX_DIRECT_COLOR) {
- red_bits = _mesa_bitcount(GET_REDMASK(v));
- green_bits = _mesa_bitcount(GET_GREENMASK(v));
- blue_bits = _mesa_bitcount(GET_BLUEMASK(v));
+ red_bits = util_bitcount(GET_REDMASK(v));
+ green_bits = util_bitcount(GET_GREENMASK(v));
+ blue_bits = util_bitcount(GET_BLUEMASK(v));
}
else {
/* this is an approximation */
if (ctx->Extensions.ARB_texture_non_power_of_two) {
target = GLX_TEXTURE_2D_EXT;
}
- else if ( _mesa_bitcount(b->width) == 1
- && _mesa_bitcount(b->height) == 1) {
+ else if ( util_bitcount(b->width) == 1
+ && util_bitcount(b->height) == 1) {
/* power of two size */
if (b->height == 1) {
target = GLX_TEXTURE_1D_EXT;