Mesa (9.0): mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXT
Ian Romanick
idr at kemper.freedesktop.org
Fri Sep 28 18:06:53 UTC 2012
Module: Mesa
Branch: 9.0
Commit: cf81335712d489a1f4778596c5a6610fc8547692
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf81335712d489a1f4778596c5a6610fc8547692
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Tue Sep 18 15:19:18 2012 +0200
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 at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit ae3023e9675a033ff66b9bb14598aa1f02530d7f)
---
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 e6140eb..7a55317 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1448,6 +1448,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;
}
@@ -1622,6 +1628,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;
}
More information about the mesa-commit
mailing list