summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_flush.c
diff options
context:
space:
mode:
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);
+ }
}
}