aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/get.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-15 15:01:30 +0200
committermarha <marha@users.sourceforge.net>2011-09-15 15:01:30 +0200
commit4420369d700d9db1563f8647e1889c6a0972ea2c (patch)
tree91e4c4e8503de8472048662e1e0b2ac7caa82e09 /mesalib/src/mesa/main/get.c
parente066f54c99aecce620158fe7f31589242df55677 (diff)
downloadvcxsrv-4420369d700d9db1563f8647e1889c6a0972ea2c.tar.gz
vcxsrv-4420369d700d9db1563f8647e1889c6a0972ea2c.tar.bz2
vcxsrv-4420369d700d9db1563f8647e1889c6a0972ea2c.zip
libxtrans libXmu libXext mesa pixman git update 15 sept 2011
Diffstat (limited to 'mesalib/src/mesa/main/get.c')
-rw-r--r--mesalib/src/mesa/main/get.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 069254b18..a777bd8c4 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -1673,10 +1673,13 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
COPY_4FV(v->value_float_4, ctx->Fog.ColorUnclamped);
break;
case GL_COLOR_CLEAR_VALUE:
- if(ctx->Color._ClampFragmentColor)
- COPY_4FV(v->value_float_4, ctx->Color.ClearColor);
- else
- COPY_4FV(v->value_float_4, ctx->Color.ClearColorUnclamped);
+ if(ctx->Color._ClampFragmentColor) {
+ v->value_float_4[0] = CLAMP(ctx->Color.ClearColor.f[0], 0.0F, 1.0F);
+ v->value_float_4[1] = CLAMP(ctx->Color.ClearColor.f[1], 0.0F, 1.0F);
+ v->value_float_4[2] = CLAMP(ctx->Color.ClearColor.f[2], 0.0F, 1.0F);
+ v->value_float_4[3] = CLAMP(ctx->Color.ClearColor.f[3], 0.0F, 1.0F);
+ } else
+ COPY_4FV(v->value_float_4, ctx->Color.ClearColor.f);
break;
case GL_BLEND_COLOR_EXT:
if(ctx->Color._ClampFragmentColor)