diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-26 14:12:33 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-26 14:15:53 -0700 |
commit | d4bd6ca8162be0684e4bff06a17b9dea1a02d217 (patch) | |
tree | ea1af4019d5b9c00a059ebf28e9793a9c8232b75 /src/mesa/pipe | |
parent | 7f4bec264e8180609846379da6f63555fc2eafef (diff) |
Cell: add check to catch recursive batch flushing
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_batch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_batch.c b/src/mesa/pipe/cell/ppu/cell_batch.c index ab4553f16c..5a25f1b266 100644 --- a/src/mesa/pipe/cell/ppu/cell_batch.c +++ b/src/mesa/pipe/cell/ppu/cell_batch.c @@ -34,13 +34,18 @@ void cell_batch_flush(struct cell_context *cell) { + static boolean flushing = FALSE; uint batch = cell->cur_batch; const uint size = cell->batch_buffer_size[batch]; uint spu, cmd_word; + assert(!flushing); + if (size == 0) return; + flushing = TRUE; + assert(batch < CELL_NUM_BATCH_BUFFERS); /* @@ -86,6 +91,8 @@ cell_batch_flush(struct cell_context *cell) cell->batch_buffer_size[batch] = 0; /* empty */ cell->cur_batch = batch; + + flushing = FALSE; } |