diff options
author | Ian Romanick <[email protected]> | 2012-09-18 15:19:18 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-10-24 11:41:07 -0700 |
commit | 1c4b61e0c226e57533e0f7362cffde0e05cc89f4 (patch) | |
tree | dad3d254a62e7bb10378518bb63d61db3ce5d4fa /src/mesa/main | |
parent | b130d42279419674cb5aecf321e1650d4f46419b (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit ae3023e9675a033ff66b9bb14598aa1f02530d7f)
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/texparam.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 0f92a5b988e..dda973785a0 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1204,6 +1204,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; } @@ -1349,6 +1355,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; } |