aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/math/m_debug_norm.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-03-05 23:40:39 +0100
committermarha <marha@users.sourceforge.net>2015-03-05 23:42:09 +0100
commitc646056120fe14e4c4ccf81bac5d78d61225a8e8 (patch)
treeba0af42750f0ab6dc4724342a7063835636222b5 /mesalib/src/mesa/math/m_debug_norm.c
parent87e58a93f7248171e736656080069cb65ff56aae (diff)
parent8574eba804031f6b19713f0b02952280730bf62e (diff)
downloadvcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.gz
vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.bz2
vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast.c mesalib/src/mesa/main/.gitignore mesalib/src/mesa/main/queryobj.c
Diffstat (limited to 'mesalib/src/mesa/math/m_debug_norm.c')
-rw-r--r--mesalib/src/mesa/math/m_debug_norm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesalib/src/mesa/math/m_debug_norm.c b/mesalib/src/mesa/math/m_debug_norm.c
index 00e72be54..197b43cf2 100644
--- a/mesalib/src/mesa/math/m_debug_norm.c
+++ b/mesalib/src/mesa/math/m_debug_norm.c
@@ -26,6 +26,7 @@
* Gareth Hughes
*/
+#include "c99_math.h"
#include "main/glheader.h"
#include "main/context.h"
#include "main/macros.h"
@@ -165,7 +166,7 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
/* Hmmm, don't know how we could test the precalculated
* length case...
*/
- scale = INV_SQRTF( len );
+ scale = 1.0f / sqrtf(len);
SCALE_SCALAR_3V( out[i], scale, t );
} else {
out[i][0] = out[i][1] = out[i][2] = 0;
@@ -241,7 +242,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
ASSIGN_3V( d2[i], 0.0, 0.0, 0.0 );
for ( j = 0 ; j < 3 ; j++ )
s[i][j] = rnd();
- length[i] = INV_SQRTF( LEN_SQUARED_3FV( s[i] ) );
+ length[i] = 1.0f / sqrtf( LEN_SQUARED_3FV( s[i] ) );
}
source->data = (GLfloat(*)[4]) s;