Mesa (master): mesa: forgot sqrt in NRM3/4 instructions
Brian Paul
brianp at kemper.freedesktop.org
Fri Nov 7 20:01:28 UTC 2008
Module: Mesa
Branch: master
Commit: 22459e7a9ca01cc5af8d9baeb6354d2e825cdbc9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=22459e7a9ca01cc5af8d9baeb6354d2e825cdbc9
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date: Fri Nov 7 12:59:36 2008 -0700
mesa: forgot sqrt in NRM3/4 instructions
---
src/mesa/shader/prog_execute.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index ef17ed1..96a0835 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -1190,7 +1190,7 @@ _mesa_execute_program(GLcontext * ctx,
fetch_vector4(&inst->SrcReg[0], machine, a);
tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2];
if (tmp != 0.0F)
- tmp = 1.0F / tmp;
+ tmp = INV_SQRTF(tmp);
result[0] = tmp * a[0];
result[1] = tmp * a[1];
result[2] = tmp * a[2];
@@ -1205,7 +1205,7 @@ _mesa_execute_program(GLcontext * ctx,
fetch_vector4(&inst->SrcReg[0], machine, a);
tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3];
if (tmp != 0.0F)
- tmp = 1.0F / tmp;
+ tmp = INV_SQRTF(tmp);
result[0] = tmp * a[0];
result[1] = tmp * a[1];
result[2] = tmp * a[2];
More information about the mesa-commit
mailing list