diff options
author | Ian Romanick <[email protected]> | 2010-09-28 11:17:27 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-10-01 15:49:12 -0700 |
commit | cc6f13def53eb280b63427fbdeca197a09315062 (patch) | |
tree | 244516808fec4e3689d318401d9c1e6c92a0a123 /src/mesa/main/texparam.c | |
parent | 3ebbc176f9200ac954d461758937e755220ac551 (diff) |
ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support
Diffstat (limited to 'src/mesa/main/texparam.c')
-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); |