summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2012-09-18 15:19:18 +0200
committerIan Romanick <ian.d.romanick@intel.com>2012-10-24 11:41:07 -0700
commit1c4b61e0c226e57533e0f7362cffde0e05cc89f4 (patch)
treedad3d254a62e7bb10378518bb63d61db3ce5d4fa
parentb130d42279419674cb5aecf321e1650d4f46419b (diff)
downloadmesa-1c4b61e0c226e57533e0f7362cffde0e05cc89f4.tar.gz
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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit ae3023e9675a033ff66b9bb14598aa1f02530d7f)
-rw-r--r--src/mesa/main/texparam.c12
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;
}