gallium: added edge flag print/debug code (disabled)
authorBrian Paul <brianp@vmware.com>
Thu, 6 May 2010 00:00:39 +0000 (18:00 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 6 May 2010 00:25:19 +0000 (18:25 -0600)
src/gallium/auxiliary/draw/draw_pipe_unfilled.c

index 03bb842e20a30c5978fe5fe899e9139e88829825..a30fada86a0913b64fa7ec608cfc110e9249a301 100644 (file)
@@ -105,6 +105,23 @@ static void lines( struct draw_stage *stage,
 }
 
 
+/** For debugging */
+static void
+print_header_flags(unsigned flags)
+{
+   debug_printf("header->flags = ");
+   if (flags & DRAW_PIPE_RESET_STIPPLE)
+      debug_printf("RESET_STIPPLE ");
+   if (flags & DRAW_PIPE_EDGE_FLAG_0)
+      debug_printf("EDGE_FLAG_0 ");
+   if (flags & DRAW_PIPE_EDGE_FLAG_1)
+      debug_printf("EDGE_FLAG_1 ");
+   if (flags & DRAW_PIPE_EDGE_FLAG_2)
+      debug_printf("EDGE_FLAG_2 ");
+   debug_printf("\n");
+}
+
+
 /* Unfilled tri:  
  *
  * Note edgeflags in the vertex struct is not sufficient as we will
@@ -119,6 +136,9 @@ static void unfilled_tri( struct draw_stage *stage,
    struct unfilled_stage *unfilled = unfilled_stage(stage);
    unsigned mode = unfilled->mode[header->det >= 0.0];
   
+   if (0)
+      print_header_flags(header->flags);
+
    switch (mode) {
    case PIPE_POLYGON_MODE_FILL:
       stage->next->tri( stage->next, header );