fix GL_DOT3_RGBA texture combiner mode in generated fragment programs (bug #11030)
[mesa.git] / src / mesa / swrast / s_span.c
index 9777391ded2338ceabb09a442c4b63a769b96497..f23272c2beec5271433972883341f1ee0a1382c2 100644 (file)
@@ -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.
  *
@@ -171,10 +171,11 @@ interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
 {
    const SWcontext *swrast = SWRAST_CONTEXT(ctx);
 
-   /* for glDraw/CopyPixels() we may have turned off some bits in
-    * the _ActiveAttribMask - be sure to obey that mask now.
+   /*
+    * Don't overwrite existing array values, such as colors that may have
+    * been produced by glDraw/CopyPixels.
     */
-   attrMask &= swrast->_ActiveAttribMask;
+   attrMask &= ~span->arrayAttribs;
 
    ATTRIB_LOOP_BEGIN
       if (attrMask & (1 << attr)) {
@@ -201,6 +202,7 @@ interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
             v3 += dv3dx;
             w += dwdx;
          }
+         ASSERT((span->arrayAttribs & (1 << attr)) == 0);
          span->arrayAttribs |= (1 << attr);
       }
    ATTRIB_LOOP_END
@@ -1178,7 +1180,10 @@ shade_texture_span(GLcontext *ctx, SWspan *span)
       if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) {
          convert_color_type(span, GL_FLOAT, 0);
       }
-      interpolate_active_attribs(ctx, span, ~0);
+      if (span->primitive != GL_POINT) {
+         /* for points, we populated the arrays already */
+         interpolate_active_attribs(ctx, span, ~0);
+      }
       span->array->ChanType = GL_FLOAT;
 
       if (!(span->arrayMask & SPAN_Z))