Mesa (master): gallium: added edge flag print/debug code (disabled)

Brian Paul brianp at kemper.freedesktop.org
Thu May 6 00:26:26 UTC 2010


Module: Mesa
Branch: master
Commit: eaad99d230c2c265b2cc20df0bf1f6f4a7837a67
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eaad99d230c2c265b2cc20df0bf1f6f4a7837a67

Author: Brian Paul <brianp at vmware.com>
Date:   Wed May  5 18:00:39 2010 -0600

gallium: added edge flag print/debug code (disabled)

---

 src/gallium/auxiliary/draw/draw_pipe_unfilled.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
index 03bb842..a30fada 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
@@ -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 );




More information about the mesa-commit mailing list