diff options
author | Marek Olšák <maraeo@gmail.com> | 2013-03-28 01:56:01 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2013-04-06 23:57:06 +0200 |
commit | 755648c37fc7a54ed0b11c868fd4c7fe28b2f861 (patch) | |
tree | af74440ff60de156f3f19b7ddcea229b686a063c /src/mesa/main/texenv.c | |
parent | 21d407c1b8bf3be1eff87121d528d03c240ce207 (diff) | |
download | external_mesa3d-755648c37fc7a54ed0b11c868fd4c7fe28b2f861.zip external_mesa3d-755648c37fc7a54ed0b11c868fd4c7fe28b2f861.tar.gz external_mesa3d-755648c37fc7a54ed0b11c868fd4c7fe28b2f861.tar.bz2 |
mesa: don't set _ClampFragmentColor to TRUE if it has no effect
This should reduce shader recompilations with drivers that emulate fragment
color clamping, because we want the clamping to be enabled only if there is
a signed normalized or floating-point colorbuffer.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/texenv.c')
-rw-r--r-- | src/mesa/main/texenv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 0fe5fbd..2979e67 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -32,6 +32,7 @@ #include "main/glheader.h" #include "main/context.h" +#include "main/blend.h" #include "main/enums.h" #include "main/macros.h" #include "main/mtypes.h" @@ -680,7 +681,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) if (pname == GL_TEXTURE_ENV_COLOR) { if(ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) _mesa_update_state(ctx); - if(ctx->Color._ClampFragmentColor) + if (_mesa_get_clamp_fragment_color(ctx)) COPY_4FV( params, texUnit->EnvColor ); else COPY_4FV( params, texUnit->EnvColorUnclamped ); |