diff options
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 3d54193580e..cb8b58b8d96 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -84,6 +84,7 @@ #include "tnl/t_pipeline.h" #include "drivers/common/driverfuncs.h" #include "drivers/common/meta.h" +#include "util/u_math.h" /** * Global X driver lock @@ -463,9 +464,9 @@ setup_truecolor(XMesaVisual v, XMesaBuffer buffer, XMesaColormap cmap) 3*16, 11*16, 1*16, 9*16, 15*16, 7*16, 13*16, 5*16, }; - GLint rBits = _mesa_bitcount(rmask); - GLint gBits = _mesa_bitcount(gmask); - GLint bBits = _mesa_bitcount(bmask); + GLint rBits = util_bitcount(rmask); + GLint gBits = util_bitcount(gmask); + GLint bBits = util_bitcount(bmask); GLint maxBits; GLuint i; @@ -828,9 +829,9 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, { 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 */ @@ -1095,8 +1096,8 @@ XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p, if (ctx->Extensions.ARB_texture_non_power_of_two) { target = GLX_TEXTURE_2D_EXT; } - else if ( _mesa_bitcount(width) == 1 - && _mesa_bitcount(height) == 1) { + else if ( util_bitcount(width) == 1 + && util_bitcount(height) == 1) { /* power of two size */ if (height == 1) { target = GLX_TEXTURE_1D_EXT; |