mesa: forgot sqrt in NRM3/4 instructions
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 7 Nov 2008 19:59:36 +0000 (12:59 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 7 Nov 2008 19:59:36 +0000 (12:59 -0700)
src/mesa/shader/prog_execute.c

index ef17ed128a79fc6d6a41de3ff27728cd079bda5b..96a083527f9af28ed715cc3236bb99dda645355e 100644 (file)
@@ -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];