summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/spu/spu_main.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-02 14:01:42 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-03 19:43:10 -0600
commit217d37940771dd02ff1aa365105eca2c7a09d623 (patch)
tree603c9c0c632c61e3409ef0925a7ec0b1aeb121a4 /src/gallium/drivers/cell/spu/spu_main.c
parent1307eebfa07e3440554eb2871e5dbd94e98ed7a8 (diff)
cell: minor texture improvements
Precompute tiles_per_row. Use ushort multiplies in a few places. New comments.
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_main.c')
-rw-r--r--src/gallium/drivers/cell/spu/spu_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_main.c b/src/gallium/drivers/cell/spu/spu_main.c
index 1ab1c40379..e04ffeb9b1 100644
--- a/src/gallium/drivers/cell/spu/spu_main.c
+++ b/src/gallium/drivers/cell/spu/spu_main.c
@@ -343,6 +343,8 @@ cmd_state_texture(const struct cell_command_texture *texture)
spu.texture[unit].width = width;
spu.texture[unit].height = height;
+ spu.texture[unit].tiles_per_row = width / TILE_SIZE;
+
spu.texture[unit].tex_size = (vector float) { width, height, 0.0, 0.0};
spu.texture[unit].tex_size_mask = (vector unsigned int)
{ width - 1, height - 1, 0, 0 };