diff options
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_state_emit.c')
-rw-r--r-- | src/mesa/pipe/cell/ppu/cell_state_emit.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_state_emit.c b/src/mesa/pipe/cell/ppu/cell_state_emit.c index e7d14d0d25..dbca900c35 100644 --- a/src/mesa/pipe/cell/ppu/cell_state_emit.c +++ b/src/mesa/pipe/cell/ppu/cell_state_emit.c @@ -36,6 +36,20 @@ void cell_emit_state(struct cell_context *cell) { + if (cell->dirty & CELL_NEW_FRAMEBUFFER) { + struct pipe_surface *cbuf = cell->framebuffer.cbufs[0]; + struct pipe_surface *zbuf = cell->framebuffer.zsbuf; + struct cell_command_framebuffer *fb + = cell_batch_alloc(cell, sizeof(*fb)); + fb->opcode = CELL_CMD_STATE_FRAMEBUFFER; + fb->color_start = cell->cbuf_map[0]; + fb->color_format = cbuf->format; + fb->depth_start = cell->zsbuf_map; + fb->depth_format = zbuf ? zbuf->format : PIPE_FORMAT_NONE; + fb->width = cell->framebuffer.cbufs[0]->width; + fb->height = cell->framebuffer.cbufs[0]->height; + } + if (cell->dirty & CELL_NEW_DEPTH_STENCIL) { uint cmd = CELL_CMD_STATE_DEPTH_STENCIL; cell_batch_append(cell, &cmd, 4); @@ -49,4 +63,10 @@ cell_emit_state(struct cell_context *cell) cell_batch_append(cell, cell->sampler[0], sizeof(struct pipe_sampler_state)); } + + if (cell->dirty & CELL_NEW_VERTEX_INFO) { + uint cmd = CELL_CMD_STATE_VERTEX_INFO; + cell_batch_append(cell, &cmd, 4); + cell_batch_append(cell, &cell->vertex_info, sizeof(struct vertex_info)); + } } |