On 13 August 2011 09:58, Kenneth Graunke kenn...@whitecape.org wrote:
On 08/12/2011 10:38 AM, Paul Berry wrote:
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a a plain int and y was an
- Original Message -
On 13 August 2011 09:58, Kenneth Graunke kenn...@whitecape.org
wrote:
On 08/12/2011 10:38 AM, Paul Berry wrote:
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
On 15 August 2011 08:50, Jose Fonseca jfons...@vmware.com wrote:
In places you don't have native int division support, you could use one
Newton-Raphson iteration step for almost accurate results, assuggested
accuracy of SSE2's RCPPS instructions. See for reference the following
llvmpipe
On 15 August 2011 10:11, Dan McCabe zen3d.li...@gmail.com wrote:
You might also want to consider implementing
quotient = int((float(x) + 0.5 * float(y)) * reciprocal(float(y)));
This rounds the result to the nearest integer rather then flooring the
result and is arguably faster (assuming
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 08/12/2011 10:38 AM, Paul Berry wrote:
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a a plain int and y was an ivecN, the lowering
On 08/15/2011 10:45 AM, Paul Berry wrote:
On 15 August 2011 10:11, Dan McCabezen3d.li...@gmail.com wrote:
You might also want to consider implementing
quotient = int((float(x) + 0.5 * float(y)) * reciprocal(float(y)));
This rounds the result to the nearest integer rather then flooring the
On 08/12/2011 10:38 AM, Paul Berry wrote:
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to
On Fri, 12 Aug 2011 10:38:35 -0700, Paul Berry stereotype...@gmail.com wrote:
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a a plain int and y was an ivecN, the lowering pass
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to be float, when in fact
it should be vecN. This