projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
790eec9
)
Cell: fix small sampling error in sample_texture_bilinear()
author
Brian
<brian.paul@tungstengraphics.com>
Mon, 4 Feb 2008 23:48:00 +0000
(16:48 -0700)
committer
Ben Skeggs
<skeggsb@gmail.com>
Fri, 15 Feb 2008 02:50:30 +0000
(13:50 +1100)
src/mesa/pipe/cell/spu/spu_texture.c
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/cell/spu/spu_texture.c
b/src/mesa/pipe/cell/spu/spu_texture.c
index 9ee2b45e24ee3eb6d4e5b5746ee9b22f646d6482..01ff33a85736e550353e0b7d1779e21351e9f4f4 100644
(file)
--- 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);