summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-08-20 18:12:44 +0100
committerKeith Whitwell <keithw@vmware.com>2009-08-20 18:12:44 +0100
commit1fd40e506c2207664f0c3f435e4614472ea4c540 (patch)
tree257decba708fe1bbea320d8947e108fc30050aff /src/gallium/drivers/softpipe
parent79a7ddb57a04cde5a4a0c27eb4a9b6889d12622a (diff)
softpipe: slightly optimized tiling calculation
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 24f3311772..90371d6353 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -893,9 +893,8 @@ sp_get_samples_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
unsigned level = samp->level;
unsigned xpot = 1 << (samp->xpot - level);
unsigned ypot = 1 << (samp->ypot - level);
-
- unsigned xmax = MIN2(TILE_SIZE, xpot) - 1;
- unsigned ymax = MIN2(TILE_SIZE, ypot) - 1;
+ unsigned xmax = (xpot - 1) & (TILE_SIZE - 1); /* MIN2(TILE_SIZE, xpot) - 1; */
+ unsigned ymax = (ypot - 1) & (TILE_SIZE - 1); /* MIN2(TILE_SIZE, ypot) - 1; */
for (j = 0; j < QUAD_SIZE; j++) {
int c;