summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/blend.c3
-rw-r--r--src/mesa/main/context.c6
-rw-r--r--src/mesa/main/image.c2
-rw-r--r--src/mesa/main/mtypes.h9
4 files changed, 7 insertions, 13 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 61b2b17c0c3..aebc70421ab 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -574,6 +574,9 @@ void _mesa_init_color( GLcontext * ctx )
else {
ctx->Color.DrawBuffer[0] = GL_FRONT;
}
+
+ ctx->Color.ClampFragmentColor = GL_FIXED_ONLY_ARB;
+ ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB;
}
/*@}*/
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 698dbd33bfb..b25300a0b0e 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1090,12 +1090,6 @@ init_attrib_groups( GLcontext *ctx )
ctx->NewState = _NEW_ALL;
ctx->ErrorValue = (GLenum) GL_NO_ERROR;
ctx->_Facing = 0;
-#if CHAN_TYPE == GL_FLOAT
- ctx->ClampFragmentColors = GL_FALSE; /* XXX temporary */
-#else
- ctx->ClampFragmentColors = GL_TRUE;
-#endif
- ctx->ClampVertexColors = GL_TRUE;
return GL_TRUE;
}
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index b9a032307c2..0a117a967b6 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1079,7 +1079,7 @@ _mesa_pack_rgba_span_float( GLcontext *ctx,
if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
/* compute luminance values */
- if (ctx->ClampFragmentColors) {
+ if (ctx->Color.ClampReadColor == GL_TRUE) {
for (i = 0; i < n; i++) {
GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
luminance[i] = CLAMP(sum, 0.0F, 1.0F);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1a90583295c..17978e7135a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -536,6 +536,9 @@ struct gl_colorbuffer_attrib
/*@}*/
GLboolean DitherFlag; /**< Dither enable flag */
+
+ GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
+ GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
};
@@ -2896,12 +2899,6 @@ struct __GLcontextRec
* We don't have a better way to communicate this value from
* swrast_setup to swrast. */
- /** \name Color clamping (tentative part of GL_ARB_color_clamp_control) */
- /*@{*/
- GLboolean ClampFragmentColors;
- GLboolean ClampVertexColors;
- /*@}*/
-
/** \name For debugging/development only */
/*@{*/
GLboolean FirstTimeCurrent;