softpipe: use one fewer divide in sample_cube

GCC won't do this for us.  Makes a bigger difference to cubemap fps
than previous set of compilcated rearrangements.
This commit is contained in:
Keith Whitwell 2009-08-23 19:28:34 +01:00
parent 60adc15ba5
commit fd19e8adcd
1 changed files with 6 additions and 3 deletions

View File

@ -1543,9 +1543,12 @@ sample_cube(struct tgsi_sampler *tgsi_sampler,
}
}
ssss[j] = ( sc / ma + 1.0F ) * 0.5F;
tttt[j] = ( tc / ma + 1.0F ) * 0.5F;
samp->faces[j] = face;
{
const float ima = 1.0 / ma;
ssss[j] = ( sc * ima + 1.0F ) * 0.5F;
tttt[j] = ( tc * ima + 1.0F ) * 0.5F;
samp->faces[j] = face;
}
}
/* In our little pipeline, the compare stage is next. If compare