[Mesa-dev] [PATCH] mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXT

Ian Romanick idr at freedesktop.org
Tue Sep 18 06:27:28 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

This was already (correctly) supported for glGetSamplerParameter paths.

NOTE: This is a candidate for stable branches.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/texparam.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 63a63b7..f73e2b5 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1440,6 +1440,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
          *params = (GLfloat) obj->Immutable;
          break;
 
+      case GL_TEXTURE_SRGB_DECODE_EXT:
+         if (!ctx->Extensions.EXT_texture_sRGB_decode)
+            goto invalid_pname;
+         *params = (GLfloat) obj->Sampler.sRGBDecode;
+         break;
+
       default:
          goto invalid_pname;
    }
@@ -1612,6 +1618,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
          *params = obj->RequiredTextureImageUnits;
          break;
 
+      case GL_TEXTURE_SRGB_DECODE_EXT:
+         if (!ctx->Extensions.EXT_texture_sRGB_decode)
+            goto invalid_pname;
+         *params = obj->Sampler.sRGBDecode;
+         break;
+
       default:
          goto invalid_pname;
    }
-- 
1.7.11.4



More information about the mesa-dev mailing list