summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/spu/spu_command.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-10-13 10:55:08 -0600
committerBrian Paul <[email protected]>2008-10-13 16:43:35 -0600
commit3b07c28dee74c7aa3be5efac8084d610675af291 (patch)
tree517a06c5b4413166bdfbe3cb9b885a146a1cba43 /src/gallium/drivers/cell/spu/spu_command.c
parent734685549ca7dbee78845fdef1d65aceaa729845 (diff)
cell: do texture sampling/filtering for four pixels at a time.
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_command.c')
-rw-r--r--src/gallium/drivers/cell/spu/spu_command.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_command.c b/src/gallium/drivers/cell/spu/spu_command.c
index 91a4c137e7c..c59be7defde 100644
--- a/src/gallium/drivers/cell/spu/spu_command.c
+++ b/src/gallium/drivers/cell/spu/spu_command.c
@@ -301,10 +301,14 @@ cmd_state_sampler(const struct cell_command_sampler *sampler)
DEBUG_PRINTF("SAMPLER [%u]\n", sampler->unit);
spu.sampler[sampler->unit] = sampler->state;
- if (spu.sampler[sampler->unit].min_img_filter == PIPE_TEX_FILTER_LINEAR)
+ if (spu.sampler[sampler->unit].min_img_filter == PIPE_TEX_FILTER_LINEAR) {
spu.sample_texture[sampler->unit] = sample_texture_bilinear;
- else
+ spu.sample_texture4[sampler->unit] = sample_texture4_bilinear;
+ }
+ else {
spu.sample_texture[sampler->unit] = sample_texture_nearest;
+ spu.sample_texture4[sampler->unit] = sample_texture4_nearest;
+ }
}
@@ -323,6 +327,9 @@ cmd_state_texture(const struct cell_command_texture *texture)
spu.texture[unit].width = width;
spu.texture[unit].height = height;
+ spu.texture[unit].width4 = spu_splats((float) width);
+ spu.texture[unit].height4 = spu_splats((float) height);
+
spu.texture[unit].tiles_per_row = width / TILE_SIZE;
spu.texture[unit].tex_size = (vector float) { width, height, 0.0, 0.0};