summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texparam.c2
1 files changed, 1 insertions, 1 deletions
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));