diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-26 14:14:56 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-26 14:15:53 -0700 |
commit | 856db7dee69083733a1d6e02a33bec4189387f60 (patch) | |
tree | d9748d4c3e6f5ad29664f61826d7069754ff9793 /src/mesa/pipe/cell/ppu/cell_flush.c | |
parent | d4bd6ca8162be0684e4bff06a17b9dea1a02d217 (diff) |
Cell: fix a recursive flushing bug
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_flush.c')
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_flush.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_flush.c b/src/mesa/pipe/cell/ppu/cell_flush.c index d54eeb8524..b98bb566b1 100644 --- a/src/mesa/pipe/cell/ppu/cell_flush.c +++ b/src/mesa/pipe/cell/ppu/cell_flush.c @@ -31,14 +31,30 @@ #include "cell_flush.h" #include "cell_spu.h" #include "cell_render.h" +#include "pipe/draw/draw_context.h" void cell_flush(struct pipe_context *pipe, unsigned flags) { struct cell_context *cell = cell_context(pipe); + + draw_flush( cell->draw ); + cell_flush_int(pipe, flags); +} + + +/** internal flush */ +void +cell_flush_int(struct pipe_context *pipe, unsigned flags) +{ + static boolean flushing = FALSE; /* recursion catcher */ + struct cell_context *cell = cell_context(pipe); uint i; + ASSERT(!flushing); + flushing = TRUE; + if (flags & PIPE_FLUSH_WAIT) { uint *cmd = (uint *) cell_batch_alloc(cell, sizeof(uint)); *cmd = CELL_CMD_FINISH; @@ -60,4 +76,6 @@ cell_flush(struct pipe_context *pipe, unsigned flags) assert(k == CELL_CMD_FINISH); } } + + flushing = FALSE; } |