aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell/spu
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-04 16:48:00 -0700
committerBrian <[email protected]>2008-02-04 16:48:00 -0700
commit1a75464cdc12a1e83f1452707cd624c53f808308 (patch)
tree3a6cc3f7f419092cf2f702f4573713921b75bfd0 /src/mesa/pipe/cell/spu
parentefa8e03a6f3f7c27b019d20cca93bf7e624d7035 (diff)
Cell: fix small sampling error in sample_texture_bilinear()
Diffstat (limited to 'src/mesa/pipe/cell/spu')
-rw-r--r--src/mesa/pipe/cell/spu/spu_texture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_texture.c b/src/mesa/pipe/cell/spu/spu_texture.c
index 9ee2b45e24e..01ff33a8573 100644
--- a/src/mesa/pipe/cell/spu/spu_texture.c
+++ b/src/mesa/pipe/cell/spu/spu_texture.c
@@ -150,6 +150,8 @@ sample_texture_bilinear(vector float texcoord)
static const vector unsigned int offset01 = {0, 1, 0, 0};
vector float tc = spu_mul(texcoord, spu.tex_size);
+ tc = spu_add(tc, spu_splats(-0.5f)); /* half texel bias */
+
/* integer texcoords S,T: */
vector unsigned int itc00 = spu_convtu(tc, 0); /* convert to int */
vector unsigned int itc01 = spu_add(itc00, offset01);