print_vertex func for debugging
authorBrian <brian@i915.localnet.net>
Wed, 8 Aug 2007 22:07:07 +0000 (16:07 -0600)
committerBrian <brian@i915.localnet.net>
Wed, 8 Aug 2007 22:10:40 +0000 (16:10 -0600)
src/mesa/pipe/softpipe/sp_prim_setup.c

index c8046be..7a3d011 100644 (file)
@@ -236,6 +236,18 @@ static void flush_spans( struct setup_stage *setup )
    setup->span.right[1] = 0;
 }
 
+#if 0
+static void print_vertex(const struct setup_stage *setup,
+                         const struct vertex_header *v)
+{
+   int i;
+   printf("Vertex:\n");
+   for (i = 0; i < setup->softpipe->nr_attrs; i++) {
+      printf("  %d: %f %f %f\n",  i, 
+          v->data[i][0], v->data[i][1], v->data[i][2]);
+   }
+}
+#endif
 
 static GLboolean setup_sort_vertices( struct setup_stage *setup,
                                      const struct prim_header *prim )
@@ -244,6 +256,13 @@ static GLboolean setup_sort_vertices( struct setup_stage *setup,
    const struct vertex_header *v1 = prim->v[1];
    const struct vertex_header *v2 = prim->v[2];
 
+#if 0
+   printf("Triangle:\n");
+   print_vertex(setup, v0);
+   print_vertex(setup, v1);
+   print_vertex(setup, v2);
+#endif
+
    setup->vprovoke = v2;
 
    /* determine bottom to top order of vertices */
@@ -429,7 +448,6 @@ static void tri_persp_coeff( struct setup_stage *setup,
 }
 
 
-
 /**
  * Compute the setup->coef[] array dadx, dady, a0 values.
  * Must be called after setup->vmin,vmid,vmax,vprovoke are initialized.