diff options
author | marha <marha@users.sourceforge.net> | 2011-01-16 16:33:47 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-16 16:33:47 +0000 |
commit | 5d0def58c0a3124e70076584cadc7c761e1f9e57 (patch) | |
tree | e87238976fbf7b0845aaa60876e417ca42146e1a /mesalib/src/mesa/main/texparam.c | |
parent | 8b668e29799ccd203f12719c6ef92c08027f6592 (diff) | |
parent | 367c91bebcdc1f5ba4278b68eb8715218d9640ad (diff) | |
download | vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.tar.gz vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.tar.bz2 vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/texparam.c')
-rw-r--r-- | mesalib/src/mesa/main/texparam.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index 1d567e430..66935af91 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -41,6 +41,7 @@ #include "main/texparam.h"
#include "main/teximage.h"
#include "main/texstate.h"
+#include "main/texfetch.h"
#include "program/prog_instruction.h"
@@ -419,7 +420,20 @@ set_tex_parameteri(struct gl_context *ctx, }
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
return GL_FALSE;
-
+ case GL_TEXTURE_SRGB_DECODE_EXT:
+ if (ctx->Extensions.EXT_texture_sRGB_decode) {
+ GLenum decode = params[0];
+ if (decode == GL_DECODE_EXT || decode == GL_SKIP_DECODE_EXT) {
+ if (texObj->sRGBDecode != decode) {
+ flush(ctx, texObj);
+ texObj->sRGBDecode = decode;
+ _mesa_update_fetch_functions(texObj);
+ }
+ return GL_TRUE;
+ }
+ }
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
+ return GL_FALSE;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
}
@@ -543,6 +557,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) case GL_TEXTURE_COMPARE_MODE_ARB:
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
+ case GL_TEXTURE_SRGB_DECODE_EXT:
{
/* convert float param to int */
GLint p[4];
@@ -591,6 +606,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) case GL_TEXTURE_COMPARE_MODE_ARB:
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
+ case GL_TEXTURE_SRGB_DECODE_EXT:
{
/* convert float param to int */
GLint p[4];
|