From: Brian Date: Thu, 27 Mar 2008 21:33:47 +0000 (-0600) Subject: gallium: remove temporary static var X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df1744c0433f3f73ebf4b06567fefa946a29c3d8;p=mesa.git gallium: remove temporary static var --- diff --git a/src/gallium/auxiliary/draw/draw_prim.c b/src/gallium/auxiliary/draw/draw_prim.c index f589d0c0173..ddcde01d9a2 100644 --- a/src/gallium/auxiliary/draw/draw_prim.c +++ b/src/gallium/auxiliary/draw/draw_prim.c @@ -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; } diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 8a879809c36..7007ee22c4d 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -223,6 +223,7 @@ struct draw_context } pt; + boolean flushing; /* pipe state that we need: */ const struct pipe_rasterizer_state *rasterizer;