From 08c2571fb48d41731c81cc402acabf709523c831 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 11 Jan 2008 12:04:55 -0700 Subject: Cell: initial work for a hw-like batch buffer system --- src/mesa/pipe/cell/spu/main.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/mesa/pipe/cell/spu') diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c index 20f15029e1..04bb087cf9 100644 --- a/src/mesa/pipe/cell/spu/main.c +++ b/src/mesa/pipe/cell/spu/main.c @@ -322,6 +322,13 @@ render(const struct cell_command_render *render) +static void +batch(const struct cell_command_batch *batch) +{ +} + + + /** * Temporary/simple main loop for SPEs: Get a command, execute it, repeat. */ @@ -359,7 +366,7 @@ main_loop(void) 0 /* rid */); wait_on_mask( 1 << tag ); - switch (opcode) { + switch (opcode & CELL_CMD_OPCODE_MASK) { case CELL_CMD_EXIT: if (Debug) printf("SPU %u: EXIT\n", init.id); @@ -403,6 +410,16 @@ main_loop(void) render(&cmd.render); break; + case CELL_CMD_BATCH: + /* execute a batch buffer */ + if (Debug) + printf("SPU %u: BATCH buffer %u, len %u\n", + init.id, + cmd.batch.buffer, + cmd.batch.length); + batch(&cmd.batch); + break; + case CELL_CMD_FINISH: if (Debug) printf("SPU %u: FINISH\n", init.id); -- cgit v1.2.3