swrast: restore !shader check around add_specular()

Fixes a regression from commit 76ac75af8e.
This commit is contained in:
Brian Paul
2009-04-07 07:04:14 -06:00
parent 799f43f2e0
commit 3e79d65083
+6 -4
View File
@@ -1379,10 +1379,12 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
if (span->primitive == GL_BITMAP || !swrast->SpecularVertexAdd) {
/* Add primary and specular (diffuse + specular) colors */
if (ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
add_specular(ctx, span);
if (!shader) {
if (ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
add_specular(ctx, span);
}
}
}