From 5767a677a0129015dcc568b6f5d2d323fae8a63f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 27 Sep 2009 20:59:28 -0600 Subject: [PATCH] mesa: fix GL_TEXTURE_LUMINANCE_SIZE query --- src/mesa/main/texparam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.30.2