Mesa (master): swrast: restore !shader check around add_specular()

Brian Paul brianp at kemper.freedesktop.org
Tue Apr 7 13:22:12 UTC 2009


Module: Mesa
Branch: master
Commit: 3e79d650835b3431464de876699d04702df99806
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e79d650835b3431464de876699d04702df99806

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Apr  7 07:04:14 2009 -0600

swrast: restore !shader check around add_specular()

Fixes a regression from commit 76ac75af8e5481b498981c133836efa2101be2dc.

---

 src/mesa/swrast/s_span.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 07b3966..cfff82b 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -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);
+         }
       }
    }
 




More information about the mesa-commit mailing list