diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-09-12 10:31:23 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-09-12 10:31:23 +0100 |
commit | 176c454765b88c71d8b1ef474bc0fd53cb253a08 (patch) | |
tree | 76a2aee9ab3ae7f94661faf305d1b7b7b82b5cb3 /src/gallium/drivers/cell/ppu/cell_state_emit.c | |
parent | 1f135456795adfb1d739a6fb66ab9540aa79b461 (diff) | |
parent | aa66f08a21b791f338b519f0c2162cd8f7b3aeb0 (diff) |
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:
progs/fp/Makefile
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_state_emit.c')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_state_emit.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c index 180b89c1f6..2da3097983 100644 --- a/src/gallium/drivers/cell/ppu/cell_state_emit.c +++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c @@ -73,6 +73,22 @@ cell_emit_state(struct cell_context *cell) #endif } + if (cell->dirty & (CELL_NEW_FS)) { + /* Send new fragment program to SPUs */ + struct cell_command_fragment_program *fp + = cell_batch_alloc(cell, sizeof(*fp)); + fp->opcode = CELL_CMD_STATE_FRAGMENT_PROGRAM; + fp->num_inst = cell->fs->code.num_inst; + memcpy(&fp->code, cell->fs->code.store, + SPU_MAX_FRAGMENT_PROGRAM_INSTS * SPE_INST_SIZE); + if (0) { + int i; + printf("PPU Emit CELL_CMD_STATE_FRAGMENT_PROGRAM:\n"); + for (i = 0; i < fp->num_inst; i++) { + printf(" %3d: 0x%08x\n", i, fp->code[i]); + } + } + } if (cell->dirty & (CELL_NEW_FRAMEBUFFER | CELL_NEW_DEPTH_STENCIL | @@ -85,7 +101,7 @@ cell_emit_state(struct cell_context *cell) struct spe_function spe_code; /* generate new code */ - gen_fragment_function(cell, &spe_code); + cell_gen_fragment_function(cell, &spe_code); /* put the new code into the batch buffer */ fops->opcode = CELL_CMD_STATE_FRAGMENT_OPS; memcpy(&fops->code, spe_code.store, |