diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-24 20:58:46 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-24 21:01:34 -0700 |
commit | 192b7f20ebbe6e5ed7d7c8d8cb25ace019723689 (patch) | |
tree | c41e31618fa4fb6440c4889050e8dde13efd0ab9 /src/gallium/drivers/cell/ppu/cell_state_emit.c | |
parent | bd0370cd26e4fe9bc84afdb3d087e46b38022961 (diff) |
cell: overhaul cell teximage code
Updated to use the new pipe_transfer functions, etc.
Texturing is working again. Though there's some bugs in mipmap texturing
but I believe those predate the pipe_transfer changes.
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, 11 insertions, 7 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c index ff529fe22c..9479c0898f 100644 --- a/src/gallium/drivers/cell/ppu/cell_state_emit.c +++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c @@ -287,19 +287,23 @@ cell_emit_state(struct cell_context *cell) for (i = 0;i < CELL_MAX_SAMPLERS; i++) { if (cell->dirty_textures & (1 << i)) { STATIC_ASSERT(sizeof(struct cell_command_texture) % 16 == 0); - struct cell_command_texture *texture - = (struct cell_command_texture *)cell_batch_alloc16(cell, sizeof(*texture)); + struct cell_command_texture *texture = + (struct cell_command_texture *) + cell_batch_alloc16(cell, sizeof(*texture)); + texture->opcode[0] = CELL_CMD_STATE_TEXTURE; texture->unit = i; if (cell->texture[i]) { + struct cell_texture *ct = cell->texture[i]; uint level; for (level = 0; level < CELL_MAX_TEXTURE_LEVELS; level++) { - texture->start[level] = cell->texture[i]->tiled_mapped[level]; - texture->width[level] = cell->texture[i]->base.width[level]; - texture->height[level] = cell->texture[i]->base.height[level]; - texture->depth[level] = cell->texture[i]->base.depth[level]; + texture->start[level] = (ct->mapped + + ct->level_offset[level]); + texture->width[level] = ct->base.width[level]; + texture->height[level] = ct->base.height[level]; + texture->depth[level] = ct->base.depth[level]; } - texture->target = cell->texture[i]->base.target; + texture->target = ct->base.target; } else { uint level; |