From dae719a68173bddedbb531c030cd4a12bcb0435b Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 12 Jan 2008 12:39:26 -0700 Subject: Cell: first state object (depth/stencil/alpha) emitted to SPUs --- src/mesa/pipe/cell/spu/spu_main.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/mesa/pipe/cell/spu/spu_main.c') diff --git a/src/mesa/pipe/cell/spu/spu_main.c b/src/mesa/pipe/cell/spu/spu_main.c index df708e65d1..f9d7302c36 100644 --- a/src/mesa/pipe/cell/spu/spu_main.c +++ b/src/mesa/pipe/cell/spu/spu_main.c @@ -38,6 +38,8 @@ #include "spu_tile.h" #include "pipe/cell/common.h" #include "pipe/p_defines.h" +#include "pipe/p_state.h" + /* helpful headers: @@ -45,7 +47,7 @@ helpful headers: /opt/ibm/cell-sdk/prototype/sysroot/usr/include/libmisc.h */ -static boolean Debug = FALSE; +static boolean Debug = TRUE; volatile struct cell_init_info init; @@ -356,6 +358,17 @@ cmd_framebuffer(const struct cell_command_framebuffer *cmd) } +static void +cmd_state_depth_stencil(const struct pipe_depth_stencil_alpha_state *state) +{ + if (Debug) + printf("SPU %u: DEPTH_STENCIL: ztest %d\n", + init.id, + state->depth.enabled); + /* XXX copy/save the state */ +} + + static void cmd_finish(void) { @@ -431,6 +444,11 @@ cmd_batch(uint opcode) cmd_finish(); pos += 1; break; + case CELL_CMD_STATE_DEPTH_STENCIL: + cmd_state_depth_stencil((struct pipe_depth_stencil_alpha_state *) + &buffer[pos+1]); + pos += (1 + sizeof(struct pipe_depth_stencil_alpha_state) / 4); + break; default: printf("SPU %u: bad opcode: 0x%x\n", init.id, buffer[pos]); ASSERT(0); -- cgit v1.2.3