summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup/ss_context.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-05-23 15:33:46 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-05-23 15:34:50 -0600
commita7008322146f589ed5cb7a563365ff5e31844c62 (patch)
treef95da3ee9e567c3c63e27a8afdf15aa4bec665d9 /src/mesa/swrast_setup/ss_context.c
parent491618b33dcb388f5d2335862cba8cf110d72ae7 (diff)
Fix problem w/ two-sided lighting and fragment programs (depth-peel regression)
Diffstat (limited to 'src/mesa/swrast_setup/ss_context.c')
-rw-r--r--src/mesa/swrast_setup/ss_context.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 9f83fde1f5..cd4ac57d37 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -123,12 +123,13 @@ setup_vertex_format(GLcontext *ctx)
EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, attrib[FRAG_ATTRIB_WPOS] );
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR0 )) {
- if (ctx->FragmentProgram._Current
- || ctx->ATIFragmentShader._Enabled
- || CHAN_TYPE == GL_FLOAT)
- EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4F, attrib[FRAG_ATTRIB_COL0]);
- else
+ swsetup->intColors = !ctx->FragmentProgram._Current
+ && !ctx->ATIFragmentShader._Enabled
+ && CHAN_TYPE == GL_UNSIGNED_BYTE;
+ if (swsetup->intColors)
EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4CHAN_4F_RGBA, color );
+ else
+ EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4F, attrib[FRAG_ATTRIB_COL0]);
}
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR1 )) {