diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-12 12:39:26 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-12 12:39:26 -0700 |
commit | dae719a68173bddedbb531c030cd4a12bcb0435b (patch) | |
tree | caea923b527e21313758977ab776d6db96313ab5 /src/mesa/pipe/cell/spu | |
parent | 68f5a6f74335e252e6a04dd6ae9ef7ae1482be97 (diff) |
Cell: first state object (depth/stencil/alpha) emitted to SPUs
Diffstat (limited to 'src/mesa/pipe/cell/spu')
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.c | 20 |
1 files changed, 19 insertions, 1 deletions
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; @@ -357,6 +359,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) { if (Debug) @@ -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); |