summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/spu/spu_texture.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-01 14:52:25 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-01 14:52:25 -0600
commit9e7b730eb25f08065d718dee4a67c67d1d133b6e (patch)
treeed01a7cda5f1c031416e654665458835e4206bf7 /src/gallium/drivers/cell/spu/spu_texture.c
parent2d02ee85093d8068f11ecb286c5f02f52786cd95 (diff)
cell: pass tex unit to get_texel()
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_texture.c')
-rw-r--r--src/gallium/drivers/cell/spu/spu_texture.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_texture.c b/src/gallium/drivers/cell/spu/spu_texture.c
index 58a426cc40..ba0d57b959 100644
--- a/src/gallium/drivers/cell/spu/spu_texture.c
+++ b/src/gallium/drivers/cell/spu/spu_texture.c
@@ -49,9 +49,8 @@ invalidate_tex_cache(void)
static uint
-get_texel(vec_uint4 coordinate)
+get_texel(uint unit, vec_uint4 coordinate)
{
- const uint unit = 0;
vec_uint4 tmp;
unsigned x = spu_extract(coordinate, 0);
unsigned y = spu_extract(coordinate, 1);
@@ -109,7 +108,7 @@ sample_texture_nearest(uint unit, vector float texcoord)
vector float tc = spu_mul(texcoord, spu.texture[unit].tex_size);
vector unsigned int itc = spu_convtu(tc, 0); /* convert to int */
itc = spu_and(itc, spu.texture[unit].tex_size_mask); /* mask (GL_REPEAT) */
- uint texel = get_texel(itc);
+ uint texel = get_texel(unit, itc);
return spu_unpack_A8R8G8B8(texel);
}