From a7008322146f589ed5cb7a563365ff5e31844c62 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 23 May 2007 15:33:46 -0600 Subject: Fix problem w/ two-sided lighting and fragment programs (depth-peel regression) --- src/mesa/swrast_setup/ss_context.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/mesa/swrast_setup/ss_context.c') 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 )) { -- cgit v1.2.3