From ae3023e9675a033ff66b9bb14598aa1f02530d7f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 18 Sep 2012 15:19:18 +0200 Subject: mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXT This was already (correctly) supported for glGetSamplerParameter paths. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick Reviewed-by: Brian Paul --- src/mesa/main/texparam.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 63a63b732a5..f73e2b5f022 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; } -- cgit v1.2.3