aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-11-10 20:15:28 -0700
committerBrian <[email protected]>2008-11-10 20:16:00 -0700
commitbe1b8e5d6c6692010a3ec117035d9b218929e2b3 (patch)
treeb21ff72555b2c3870036562924fa86c8042e53bc /src/mesa/main/pixel.c
parent8df4f6667f2892368791ae25505a996bc0edfacb (diff)
mesa: new _mesa_is_pow_two() function
Diffstat (limited to 'src/mesa/main/pixel.c')
-rw-r--r--src/mesa/main/pixel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index c98506b2bb0..8d24a201f07 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;
}