#define CELL_CMD_STATE_VERTEX_INFO 14
#define CELL_CMD_STATE_VIEWPORT 15
#define CELL_CMD_STATE_VS_ARRAY_INFO 16
-#define CELL_CMD_VS_EXECUTE 17
+#define CELL_CMD_STATE_BLEND 17
+#define CELL_CMD_VS_EXECUTE 18
#define CELL_NUM_BUFFERS 4
fb->height = cell->framebuffer.cbufs[0]->height;
}
+ if (cell->dirty & CELL_NEW_BLEND) {
+ emit_state_cmd(cell, CELL_CMD_STATE_BLEND,
+ cell->blend,
+ sizeof(struct pipe_blend_state));
+ }
+
if (cell->dirty & CELL_NEW_DEPTH_STENCIL) {
emit_state_cmd(cell, CELL_CMD_STATE_DEPTH_STENCIL,
cell->depth_stencil,
}
+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)
{
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]);
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];