X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fpixel.c;h=57ae9c721a823e42b0aefac04f045eca947773fc;hb=06cd826fcba7bde168a85444a95de589ff5b6f2e;hp=c98506b2bb00cdd9281eab48fea0631595432c1f;hpb=7513bc3886b69335e7976b2c9bbde8e928485818;p=mesa.git diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index c98506b2bb0..57ae9c721a8 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -150,7 +150,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) if (map >= GL_PIXEL_MAP_S_TO_S && map <= GL_PIXEL_MAP_I_TO_A) { /* test that mapsize is a power of two */ - if (_mesa_bitcount((GLuint) mapsize) != 1) { + if (!_mesa_is_pow_two(mapsize)) { _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); return; } @@ -209,7 +209,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) if (map >= GL_PIXEL_MAP_S_TO_S && map <= GL_PIXEL_MAP_I_TO_A) { /* test that mapsize is a power of two */ - if (_mesa_bitcount((GLuint) mapsize) != 1) { + if (!_mesa_is_pow_two(mapsize)) { _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapuiv(mapsize)" ); return; } @@ -282,7 +282,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) if (map >= GL_PIXEL_MAP_S_TO_S && map <= GL_PIXEL_MAP_I_TO_A) { /* test that mapsize is a power of two */ - if (_mesa_bitcount((GLuint) mapsize) != 1) { + if (!_mesa_is_pow_two(mapsize)) { _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapuiv(mapsize)" ); return; } @@ -819,7 +819,7 @@ update_image_transfer_state(GLcontext *ctx) /** - * Update meas pixel transfer derived state. + * Update mesa pixel transfer derived state. */ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state ) { @@ -828,7 +828,7 @@ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state ) /* References ColorMatrix.type (derived above). */ - if (new_state & _IMAGE_NEW_TRANSFER_STATE) + if (new_state & _MESA_NEW_TRANSFER_STATE) update_image_transfer_state(ctx); }