gallium: remove temporary static var
authorBrian <brian.paul@tungstengraphics.com>
Thu, 27 Mar 2008 21:33:47 +0000 (15:33 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 27 Mar 2008 21:43:32 +0000 (15:43 -0600)
src/gallium/auxiliary/draw/draw_prim.c
src/gallium/auxiliary/draw/draw_private.h

index f589d0c0173860f6692f5622f8007a97a63184a8..ddcde01d9a2e41cc5298822680bd2ddf0213538b 100644 (file)
@@ -158,15 +158,15 @@ static INLINE void fetch_and_store(struct draw_context *draw)
 
 void draw_do_flush( struct draw_context *draw, unsigned flags )
 {
-   static boolean flushing = FALSE;
-
    if (0)
       debug_printf("Flushing with %d verts, %d prims\n",
                    draw->vs.queue_nr,
                    draw->pq.queue_nr );
 
-   if (!flushing) {
-      flushing = TRUE;
+   if (draw->flushing)
+      return;
+
+   draw->flushing = TRUE;
 
    if (flags >= DRAW_FLUSH_SHADER_QUEUE) {
       if (draw->vs.queue_nr) {
@@ -189,8 +189,7 @@ void draw_do_flush( struct draw_context *draw, unsigned flags )
       }    
    }
 
-      flushing = FALSE;
-   }
+   draw->flushing = FALSE;
 }
 
 
index 8a879809c36f8b6f95362837d19cbe1228f15cac..7007ee22c4d3df1f1a04e12b5319f31d8db78383 100644 (file)
@@ -223,6 +223,7 @@ struct draw_context
 
    } pt;
 
+   boolean flushing;
 
    /* pipe state that we need: */
    const struct pipe_rasterizer_state *rasterizer;