diff options
author | Brian Paul <[email protected]> | 2008-04-23 18:08:20 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-04-23 18:08:20 -0600 |
commit | 14d1ca8d867d6e44c756cb759f92421107118b2e (patch) | |
tree | d68f30e4928d571e7d7b833885949715f57cc743 /src/gallium/auxiliary/draw/draw_context.c | |
parent | 8437f5c763c1a1ac364d71426109c2b095bbcc72 (diff) |
gallium: fix issues in recursive flushing
When flushing/rendering, some stages (like AA line/point) need to set
pipe/driver state. Those driver functions often call draw_flush().
That leads to recursion.
Use new draw->suspend_flush flag to explicitly prevent that in the key places.
Remove the draw->vcache_flushing field.
Reuse draw->flushing as a debug/assertion var.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index f90187816b5..98e23fa8305 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -367,8 +367,10 @@ draw_set_mapped_element_buffer( struct draw_context *draw, */ void draw_do_flush( struct draw_context *draw, unsigned flags ) { - if (!draw->flushing && !draw->vcache_flushing) + if (!draw->suspend_flushing) { + assert(!draw->flushing); /* catch inadvertant recursion */ + draw->flushing = TRUE; draw_pipeline_flush( draw, flags ); |