Module: Mesa
Branch: master
Commit: cc6f13def53eb280b63427fbdeca197a09315062
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc6f13def53eb280b63427fbdeca197a09315062

Author: Ian Romanick <[email protected]>
Date:   Tue Sep 28 11:17:27 2010 -0700

ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support

---

 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 187049c..58d7858 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);

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to