From dde814776c1feee30e986858782c14d9b0feeaea Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Sun, 29 Jul 2007 19:40:50 +0200 Subject: fix range reduction for sin/cos in i915tex (#11609) --- src/mesa/drivers/dri/i915tex/i915_fragprog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/i915tex/i915_fragprog.c') diff --git a/src/mesa/drivers/dri/i915tex/i915_fragprog.c b/src/mesa/drivers/dri/i915tex/i915_fragprog.c index a4b22a0c32..95ec50490a 100644 --- a/src/mesa/drivers/dri/i915tex/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915tex/i915_fragprog.c @@ -320,7 +320,7 @@ upload_program(struct i915_fragment_program *p) i915_emit_arith(p, A0_MUL, tmp, A0_DEST_CHANNEL_X, 0, - src0, i915_emit_const1f(p, 1.0 / (M_PI * 2)), 0); + src0, i915_emit_const1f(p, 1.0 / (M_PI)), 0); i915_emit_arith(p, A0_MOD, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0); @@ -329,7 +329,7 @@ upload_program(struct i915_fragment_program *p) i915_emit_arith(p, A0_MUL, tmp, A0_DEST_CHANNEL_X, 0, - tmp, i915_emit_const1f(p, (M_PI * 2)), 0); + tmp, i915_emit_const1f(p, (M_PI)), 0); /* * t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1 @@ -642,7 +642,7 @@ upload_program(struct i915_fragment_program *p) i915_emit_arith(p, A0_MUL, tmp, A0_DEST_CHANNEL_X, 0, - src0, i915_emit_const1f(p, 1.0 / (M_PI * 2)), 0); + src0, i915_emit_const1f(p, 1.0 / (M_PI)), 0); i915_emit_arith(p, A0_MOD, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0); @@ -651,7 +651,7 @@ upload_program(struct i915_fragment_program *p) i915_emit_arith(p, A0_MUL, tmp, A0_DEST_CHANNEL_X, 0, - tmp, i915_emit_const1f(p, (M_PI * 2)), 0); + tmp, i915_emit_const1f(p, (M_PI)), 0); /* * t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1 -- cgit v1.2.3