aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-16 16:08:57 +0000
committermarha <marha@users.sourceforge.net>2011-01-16 16:08:57 +0000
commit367c91bebcdc1f5ba4278b68eb8715218d9640ad (patch)
tree7ddef803c402f1b84e293793c5fd3d0e95d3de0a /mesalib/src/mesa/main/texparam.c
parent6feea7e6cdde235d7e3727c4155ca9f8d90df3ca (diff)
downloadvcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.tar.gz
vcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.tar.bz2
vcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.zip
mesalib git update 16/1/2011
Diffstat (limited to 'mesalib/src/mesa/main/texparam.c')
-rw-r--r--mesalib/src/mesa/main/texparam.c18
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];