diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texparam.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 187049c0701..58d785812ea 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -870,7 +870,17 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, *params = img->Border; break; case GL_TEXTURE_RED_SIZE: + if (img->_BaseFormat == GL_RED) { + *params = _mesa_get_format_bits(texFormat, pname); + break; + } + /* FALLTHROUGH */ case GL_TEXTURE_GREEN_SIZE: + if (img->_BaseFormat == GL_RG) { + *params = _mesa_get_format_bits(texFormat, pname); + break; + } + /* FALLTHROUGH */ case GL_TEXTURE_BLUE_SIZE: if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA) *params = _mesa_get_format_bits(texFormat, pname); |