mesa: fix GL_TEXTURE_LUMINANCE_SIZE query
authorBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 02:59:28 +0000 (20:59 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 02:59:28 +0000 (20:59 -0600)
src/mesa/main/texparam.c

index 5f2c890ec8e572378057495252e2acaccb93df0b..d38d5a4c2303c459ca65cd54c52c7568795c5272 100644 (file)
@@ -819,7 +819,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
             *params = 0;
          else {
             *params = _mesa_get_format_bits(texFormat, pname);
-            if (img->TexFormat->LuminanceBits == 0) {
+            if (*params == 0) {
                /* luminance probably stored as rgb texture */
                *params = MIN2(_mesa_get_format_bits(texFormat, GL_TEXTURE_RED_SIZE),
                               _mesa_get_format_bits(texFormat, GL_TEXTURE_GREEN_SIZE));