From: Brian Paul Date: Mon, 28 Sep 2009 02:59:28 +0000 (-0600) Subject: mesa: fix GL_TEXTURE_LUMINANCE_SIZE query X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5767a677a0129015dcc568b6f5d2d323fae8a63f;p=mesa.git mesa: fix GL_TEXTURE_LUMINANCE_SIZE query --- diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 5f2c890ec8e..d38d5a4c230 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -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));