summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-07-27 15:51:15 +0100
committerKeith Whitwell <[email protected]>2009-07-27 15:51:15 +0100
commit5fdac2dcea09c654725666b3cab5f59dfc9e31a5 (patch)
treee8945c59299265afb83106dc20c661eafbdfed7d /src/gallium
parent6142de393fe34ff0866f8489f1292eb473276f11 (diff)
softpipe: fix off-by-one in nearest texcoord routines
Stray '- 0.5' copied from linear versions.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 8248576e98e..4651d781a95 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -955,8 +955,8 @@ sp_get_samples_2d_nearest_repeat_POT(struct tgsi_sampler *tgsi_sampler,
for (j = 0; j < QUAD_SIZE; j++) {
int c;
- float u = s[j] * xpot - 0.5F;
- float v = t[j] * ypot - 0.5F;
+ float u = s[j] * xpot;
+ float v = t[j] * ypot;
int uflr = util_ifloor(u);
int vflr = util_ifloor(v);
@@ -990,8 +990,8 @@ sp_get_samples_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
for (j = 0; j < QUAD_SIZE; j++) {
int c;
- float u = s[j] * xpot - 0.5F;
- float v = t[j] * ypot - 0.5F;
+ float u = s[j] * xpot;
+ float v = t[j] * ypot;
int x0, y0;
const float *out;