diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-02-04 15:06:10 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-02-04 15:06:10 -0700 |
commit | 7a1d01f2a0d8f0875a265e7d4e31e1348fd82677 (patch) | |
tree | 2c466f58cc0da6f531e3d1fbd8c33beb6f29e297 /src/mesa/pipe/cell/spu | |
parent | 8f924e4df06a5d45dda338e7a0a87308e48df57e (diff) |
Cell: emit blend state to SPUs
Diffstat (limited to 'src/mesa/pipe/cell/spu')
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.c | 17 | ||||
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_main.c b/src/mesa/pipe/cell/spu/spu_main.c index 48e016fc8b..9d8e6df0e3 100644 --- a/src/mesa/pipe/cell/spu/spu_main.c +++ b/src/mesa/pipe/cell/spu/spu_main.c @@ -233,6 +233,18 @@ cmd_state_framebuffer(const struct cell_command_framebuffer *cmd) static void +cmd_state_blend(const struct pipe_blend_state *state) +{ + if (Debug) + printf("SPU %u: BLEND: ztest %d\n", + spu.init.id, + state->blend_enable); + + memcpy(&spu.blend, state, sizeof(*state)); +} + + +static void cmd_state_depth_stencil(const struct pipe_depth_stencil_alpha_state *state) { if (Debug) @@ -398,6 +410,11 @@ cmd_batch(uint opcode) cmd_finish(); pos += 1; break; + case CELL_CMD_STATE_BLEND: + cmd_state_blend((struct pipe_blend_state *) + &buffer[pos+1]); + pos += (1 + sizeof(struct pipe_blend_state) / 4); + break; case CELL_CMD_STATE_DEPTH_STENCIL: cmd_state_depth_stencil((struct pipe_depth_stencil_alpha_state *) &buffer[pos+1]); diff --git a/src/mesa/pipe/cell/spu/spu_main.h b/src/mesa/pipe/cell/spu/spu_main.h index fb98b0d889..b22d563551 100644 --- a/src/mesa/pipe/cell/spu/spu_main.h +++ b/src/mesa/pipe/cell/spu/spu_main.h @@ -86,6 +86,7 @@ struct spu_global struct cell_init_info init; struct spu_framebuffer fb; + struct pipe_blend_state blend_stencil; struct pipe_depth_stencil_alpha_state depth_stencil; struct pipe_blend_state blend; struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS]; |