summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_pipe_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_pipe_state.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_pipe_state.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_pipe_state.c b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
index c880760e4b..4ca8c153b0 100644
--- a/src/gallium/drivers/cell/ppu/cell_pipe_state.c
+++ b/src/gallium/drivers/cell/ppu/cell_pipe_state.c
@@ -54,14 +54,19 @@ cell_create_blend_state(struct pipe_context *pipe,
static void
-cell_bind_blend_state(struct pipe_context *pipe, void *blend)
+cell_bind_blend_state(struct pipe_context *pipe, void *state)
{
struct cell_context *cell = cell_context(pipe);
+ struct cell_blend_state *blend = (struct cell_blend_state *) state;
+
draw_flush(cell->draw);
- cell->blend = (const struct cell_blend_state *)blend;
+ if ((blend != NULL) && (blend->code.store == NULL)) {
+ cell_generate_depth_stencil_test(blend);
+ }
+ cell->blend = blend;
cell->dirty |= CELL_NEW_BLEND;
}
@@ -70,7 +75,7 @@ static void
cell_delete_blend_state(struct pipe_context *pipe, void *blend)
{
struct cell_blend_state *cb = (struct cell_blend_state *) blend;
-
+
spe_release_func(& cb->code);
FREE(cb);
}