diff options
author | Brian <[email protected]> | 2008-03-31 17:38:21 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-31 17:38:21 -0600 |
commit | 14452aee73e16f2ede075cf894e69d62cc539f5e (patch) | |
tree | 4ea1379e714057945f357930c955316f5d1e857b /src/gallium/drivers/cell/ppu | |
parent | 84c2821d2a3b0252d6ccdfc88c6acd8f72134ebf (diff) |
cell: initial work to support multi-texture
Diffstat (limited to 'src/gallium/drivers/cell/ppu')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_state_emit.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c index 4c75caa0251..4fbe1a21b8d 100644 --- a/src/gallium/drivers/cell/ppu/cell_state_emit.c +++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c @@ -129,17 +129,15 @@ cell_emit_state(struct cell_context *cell) if (cell->dirty & CELL_NEW_TEXTURE) { struct cell_command_texture texture; - if (cell->texture[0]) { - texture.start = cell->texture[0]->tiled_data; - texture.width = cell->texture[0]->base.width[0]; - texture.height = cell->texture[0]->base.height[0]; + uint i; + memset(&texture, 0, sizeof(texture)); + for (i = 0;i < CELL_MAX_SAMPLERS; i++) { + if (cell->texture[i]) { + texture.texture[i].start = cell->texture[i]->tiled_data; + texture.texture[i].width = cell->texture[i]->base.width[0]; + texture.texture[i].height = cell->texture[i]->base.height[0]; + } } - else { - texture.start = NULL; - texture.width = 0; - texture.height = 0; - } - emit_state_cmd(cell, CELL_CMD_STATE_TEXTURE, &texture, sizeof(struct cell_command_texture)); } |