From: Eric Anholt Date: Sat, 29 Oct 2005 00:27:01 +0000 (+0000) Subject: Bug #4901: Correct secondary color emission when lighting is turned off, tested X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aba878d8c2d0d75b0762f7d8ae191fa438fc7d6a;p=mesa.git Bug #4901: Correct secondary color emission when lighting is turned off, tested with seccolor on rv200 and r200. Submitted by: sroland --- diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index f6461a164e6..c41622debe5 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -395,9 +395,10 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx, */ if (ctx->Light.Enabled) { inputs |= VERT_BIT_NORMAL; - if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { - inputs |= VERT_BIT_COLOR1; - } + } + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + inputs |= VERT_BIT_COLOR1; } if ( (ctx->Fog.FogCoordinateSource == GL_FOG_COORD) && ctx->Fog.Enabled ) { diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c index 90383d40916..cd421567b61 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tcl.c +++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c @@ -391,9 +391,10 @@ static GLboolean radeon_run_tcl_render( GLcontext *ctx, */ if (ctx->Light.Enabled) { inputs |= VERT_BIT_NORMAL; - if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { - inputs |= VERT_BIT_COLOR1; - } + } + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + inputs |= VERT_BIT_COLOR1; } if ( (ctx->Fog.FogCoordinateSource == GL_FOG_COORD) && ctx->Fog.Enabled ) {