summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tex_sample.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-08-20 18:13:25 +0100
committerKeith Whitwell <keithw@vmware.com>2009-08-20 18:13:25 +0100
commit0d9979d9ec5b931856d29c4ec44edb1f4931d1ac (patch)
treec1261b26130d5774af4247e186592eb74b6c6e1c /src/gallium/drivers/softpipe/sp_tex_sample.c
parent1fd40e506c2207664f0c3f435e4614472ea4c540 (diff)
softpipe: fix xpot calculation typo in sp_get_samples_2d_nearest_clamp_POT
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 90371d6353..2987548fb3 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -985,8 +985,8 @@ sp_get_samples_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
const struct sp_shader_sampler *samp = sp_shader_sampler(tgsi_sampler);
unsigned j;
unsigned level = samp->level;
- unsigned xpot = (1<<samp->xpot);
- unsigned ypot = (1<<samp->ypot);
+ unsigned xpot = 1 << (samp->xpot - level);
+ unsigned ypot = 1 << (samp->ypot - level);
for (j = 0; j < QUAD_SIZE; j++) {
int c;