Merge branch 'mesa_7_7_branch'
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_vb.c
index 62885daaa5bc9c6b462038e3e2bf36ac3d0313b8..0f3c877a3e7c6b8f924c12f02bc7aad509c6a042 100644 (file)
  *
  */
  
-#include "glheader.h"
-#include "mtypes.h"
-#include "imports.h"
-#include "macros.h"
-#include "colormac.h"
-
-#include "math/m_translate.h"
-#include "swrast_setup/swrast_setup.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/colormac.h"
 
 #include "tdfx_context.h"
 #include "tdfx_vb.h"
-#include "tdfx_tris.h"
-#include "tdfx_state.h"
 #include "tdfx_render.h"
 
 static void copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
@@ -69,11 +64,11 @@ static void interp_extras( GLcontext *ctx,
 
    /*fprintf(stderr, "%s\n", __FUNCTION__);*/
 
-   if (VB->ColorPtr[1]) {
+   if (VB->BackfaceColorPtr) {
       INTERP_4F( t,
-                   GET_COLOR(VB->ColorPtr[1], dst),
-                   GET_COLOR(VB->ColorPtr[1], out),
-                   GET_COLOR(VB->ColorPtr[1], in) );
+                GET_COLOR(VB->BackfaceColorPtr, dst),
+                GET_COLOR(VB->BackfaceColorPtr, out),
+                GET_COLOR(VB->BackfaceColorPtr, in) );
    }
 
    if (VB->EdgeFlag) {
@@ -88,9 +83,9 @@ static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
 {
    struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
 
-   if (VB->ColorPtr[1]) {
-        COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst), 
-                    GET_COLOR(VB->ColorPtr[1], src) );
+   if (VB->BackfaceColorPtr) {
+      COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+               GET_COLOR(VB->BackfaceColorPtr, src) );
    }
 
    setup_tab[TDFX_CONTEXT(ctx)->SetupIndex].copy_pv(ctx, dst, src);