From cc6f13def53eb280b63427fbdeca197a09315062 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 28 Sep 2010 11:17:27 -0700 Subject: ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support --- src/mesa/main/texparam.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa/main/texparam.c') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 187049c070..58d785812e 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); -- cgit v1.2.3