Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / mesa / drivers / glide / fxvb.c
index 8b731355b5172dfd5ecccd6ca802553bac7ea049..1dc5f9891a1613c876e13bbf7a13fa96b9cd8ae4 100644 (file)
 
 #ifdef FX
 
-#include "glheader.h"
-#include "mtypes.h"
-#include "imports.h"
-#include "macros.h"
-#include "colormac.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/colormac.h"
 
 #include "math/m_translate.h"
 #include "swrast_setup/swrast_setup.h"
@@ -104,17 +104,18 @@ static void interp_extras( GLcontext *ctx,
 {
    struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
 
-   /* If stride is zero, ColorPtr[1] is constant across the VB, so
-    * there is no point interpolating between two values as they will
-    * be identical.
-    */
    if (VB->ColorPtr[1]) {
-      assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
-
-      INTERP_4F( t,
-                GET_COLOR(VB->ColorPtr[1], dst),
-                GET_COLOR(VB->ColorPtr[1], out),
-                GET_COLOR(VB->ColorPtr[1], in) );
+      /* If stride is zero, ColorPtr[1] is constant across the VB, so
+       * there is no point interpolating between two values as they will
+       * be identical.  This case is handled in t_dd_tritmp.h
+       */
+      if (VB->ColorPtr[1]->stride) {
+        assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+        INTERP_4F( t,
+                   GET_COLOR(VB->ColorPtr[1], dst),
+                   GET_COLOR(VB->ColorPtr[1], out),
+                   GET_COLOR(VB->ColorPtr[1], in) );
+      }
 
       if (VB->SecondaryColorPtr[1]) {
         INTERP_3F( t,