summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_flush.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-11 16:08:53 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-11 16:08:53 -0700
commit8dd678208e4dcd90e07dc271d11d73d87465e0fd (patch)
tree6d7b4240f016f85674aca918bf0d3ca3afcd606a /src/mesa/pipe/cell/ppu/cell_flush.c
parent08c2571fb48d41731c81cc402acabf709523c831 (diff)
Cell: basic batch buffer working
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_flush.c')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_flush.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_flush.c b/src/mesa/pipe/cell/ppu/cell_flush.c
index 977c50da32..33cbe2a085 100644
--- a/src/mesa/pipe/cell/ppu/cell_flush.c
+++ b/src/mesa/pipe/cell/ppu/cell_flush.c
@@ -38,16 +38,25 @@ cell_flush(struct pipe_context *pipe, unsigned flags)
struct cell_context *cell = cell_context(pipe);
uint i;
- cell_flush_prim_buffer(cell);
+ if (flags & PIPE_FLUSH_WAIT) {
+ uint *cmd = (uint *) cell_batch_alloc(cell, sizeof(uint));
+ *cmd = CELL_CMD_FINISH;
+ }
+
+ cell_batch_flush(cell);
+#if 0
/* Send CMD_FINISH to all SPUs */
for (i = 0; i < cell->num_spus; i++) {
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_FINISH);
}
+#endif
- /* Wait for ack */
- for (i = 0; i < cell->num_spus; i++) {
- uint k = wait_mbox_message(cell_global.spe_contexts[i]);
- assert(k == CELL_CMD_FINISH);
+ if (flags & PIPE_FLUSH_WAIT) {
+ /* Wait for ack */
+ for (i = 0; i < cell->num_spus; i++) {
+ uint k = wait_mbox_message(cell_global.spe_contexts[i]);
+ assert(k == CELL_CMD_FINISH);
+ }
}
}