swrast: restore !shader check around add_specular()
authorBrian Paul <brianp@vmware.com>
Tue, 7 Apr 2009 13:04:14 +0000 (07:04 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 7 Apr 2009 13:04:14 +0000 (07:04 -0600)
Fixes a regression from commit 76ac75af8e5481b498981c133836efa2101be2dc.

src/mesa/swrast/s_span.c

index 07b39666037acf5af02f75265b823166f0c247d9..cfff82b05131bf092de5643392cb0b0e3053e0f5 100644 (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);
+         }
       }
    }