summaryrefslogtreecommitdiff
path: root/src/mesa/math
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-19 12:32:24 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-02-19 12:32:24 -0500
commit298be2b028263b2c343a707662c6fbfa18293cb2 (patch)
tree97ebdbbd457cbb2803ab03125355885c49d22f55 /src/mesa/math
parent32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (diff)
Replace the _mesa_*printf() wrappers with the plain libc versions
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_debug_clip.c44
-rw-r--r--src/mesa/math/m_debug_norm.c34
-rw-r--r--src/mesa/math/m_debug_xform.c32
-rw-r--r--src/mesa/math/m_vector.c16
4 files changed, 63 insertions, 63 deletions
diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c
index 95ae5a347da..7ea5428aa26 100644
--- a/src/mesa/math/m_debug_clip.c
+++ b/src/mesa/math/m_debug_clip.c
@@ -270,20 +270,20 @@ static int test_cliptest_function( clip_func func, int np,
}
if ( dco != rco ) {
- _mesa_printf( "\n-----------------------------\n" );
- _mesa_printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco );
+ printf( "\n-----------------------------\n" );
+ printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco );
return 0;
}
if ( dca != rca ) {
- _mesa_printf( "\n-----------------------------\n" );
- _mesa_printf( "dca = 0x%02x rca = 0x%02x\n", dca, rca );
+ printf( "\n-----------------------------\n" );
+ printf( "dca = 0x%02x rca = 0x%02x\n", dca, rca );
return 0;
}
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
if ( dm[i] != rm[i] ) {
- _mesa_printf( "\n-----------------------------\n" );
- _mesa_printf( "(i = %i)\n", i );
- _mesa_printf( "dm = 0x%02x rm = 0x%02x\n", dm[i], rm[i] );
+ printf( "\n-----------------------------\n" );
+ printf( "(i = %i)\n", i );
+ printf( "dm = 0x%02x rm = 0x%02x\n", dm[i], rm[i] );
return 0;
}
}
@@ -297,19 +297,19 @@ static int test_cliptest_function( clip_func func, int np,
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
for ( j = 0 ; j < 4 ; j++ ) {
if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) {
- _mesa_printf( "\n-----------------------------\n" );
- _mesa_printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n",
+ printf( "\n-----------------------------\n" );
+ printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n",
i, j, dm[i], rm[i] );
- _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][0], r[i][0], r[i][0]-d[i][0],
MAX_PRECISION - significand_match( d[i][0], r[i][0] ) );
- _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][1], r[i][1], r[i][1]-d[i][1],
MAX_PRECISION - significand_match( d[i][1], r[i][1] ) );
- _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][2], r[i][2], r[i][2]-d[i][2],
MAX_PRECISION - significand_match( d[i][2], r[i][2] ) );
- _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][3], r[i][3], r[i][3]-d[i][3],
MAX_PRECISION - significand_match( d[i][3], r[i][3] ) );
return 0;
@@ -335,19 +335,19 @@ void _math_test_all_cliptest_functions( char *description )
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead );
+ printf( "counter overhead: %ld cycles\n\n", counter_overhead );
}
- _mesa_printf( "cliptest results after hooking in %s functions:\n", description );
+ printf( "cliptest results after hooking in %s functions:\n", description );
}
#endif
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf( "\n\t" );
+ printf( "\n\t" );
for ( psize = 2 ; psize <= 4 ; psize++ ) {
- _mesa_printf( " p%d\t", psize );
+ printf( " p%d\t", psize );
}
- _mesa_printf( "\n--------------------------------------------------------\n\t" );
+ printf( "\n--------------------------------------------------------\n\t" );
}
#endif
@@ -358,23 +358,23 @@ void _math_test_all_cliptest_functions( char *description )
if ( test_cliptest_function( func, np, psize, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf( buf, "%s[%d] failed test (%s)",
+ sprintf( buf, "%s[%d] failed test (%s)",
cnames[np], psize, description );
_mesa_problem( NULL, buf );
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf( " %li\t", benchmark_tab[np][psize-1] );
+ printf( " %li\t", benchmark_tab[np][psize-1] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf( " | [%s]\n\t", cstrings[np] );
+ printf( " | [%s]\n\t", cstrings[np] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf( "\n" );
+ printf( "\n" );
#endif
}
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index f9b26d80471..546e8641da4 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -294,15 +294,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
for ( j = 0 ; j < 3 ; j++ ) {
if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) {
- _mesa_printf( "-----------------------------\n" );
- _mesa_printf( "(i = %i, j = %i)\n", i, j );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "-----------------------------\n" );
+ printf( "(i = %i, j = %i)\n", i, j );
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d[i][0], r[i][0], r[i][0]/d[i][0],
MAX_PRECISION - significand_match( d[i][0], r[i][0] ) );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d[i][1], r[i][1], r[i][1]/d[i][1],
MAX_PRECISION - significand_match( d[i][1], r[i][1] ) );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d[i][2], r[i][2], r[i][2]/d[i][2],
MAX_PRECISION - significand_match( d[i][2], r[i][2] ) );
return 0;
@@ -310,15 +310,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
if ( norm_normalize_types[mtype] != 0 ) {
if ( significand_match( d2[i][j], r2[i][j] ) < REQUIRED_PRECISION ) {
- _mesa_printf( "------------------- precalculated length case ------\n" );
- _mesa_printf( "(i = %i, j = %i)\n", i, j );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "------------------- precalculated length case ------\n" );
+ printf( "(i = %i, j = %i)\n", i, j );
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d2[i][0], r2[i][0], r2[i][0]/d2[i][0],
MAX_PRECISION - significand_match( d2[i][0], r2[i][0] ) );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d2[i][1], r2[i][1], r2[i][1]/d2[i][1],
MAX_PRECISION - significand_match( d2[i][1], r2[i][1] ) );
- _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ printf( "%f \t %f \t [ratio = %e - %i bit missed]\n",
d2[i][2], r2[i][2], r2[i][2]/d2[i][2],
MAX_PRECISION - significand_match( d2[i][2], r2[i][2] ) );
return 0;
@@ -346,11 +346,11 @@ void _math_test_all_normal_transform_functions( char *description )
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead );
+ printf( "counter overhead: %ld cycles\n\n", counter_overhead );
}
- _mesa_printf( "normal transform results after hooking in %s functions:\n",
+ printf( "normal transform results after hooking in %s functions:\n",
description );
- _mesa_printf( "\n-------------------------------------------------------\n" );
+ printf( "\n-------------------------------------------------------\n" );
}
#endif
@@ -360,21 +360,21 @@ void _math_test_all_normal_transform_functions( char *description )
if ( test_norm_function( func, mtype, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)",
+ sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)",
norm_strings[mtype], description );
_mesa_problem( NULL, buf );
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf( " %li\t", benchmark_tab[mtype] );
- _mesa_printf( " | [%s]\n", norm_strings[mtype] );
+ printf( " %li\t", benchmark_tab[mtype] );
+ printf( " | [%s]\n", norm_strings[mtype] );
}
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf( "\n" );
+ printf( "\n" );
}
#endif
}
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c
index df8cc066b6e..df1bc8aadfa 100644
--- a/src/mesa/math/m_debug_xform.c
+++ b/src/mesa/math/m_debug_xform.c
@@ -254,18 +254,18 @@ static int test_transform_function( transform_func func, int psize,
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
for ( j = 0 ; j < 4 ; j++ ) {
if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) {
- _mesa_printf("-----------------------------\n" );
- _mesa_printf("(i = %i, j = %i)\n", i, j );
- _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf("-----------------------------\n" );
+ printf("(i = %i, j = %i)\n", i, j );
+ printf("%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][0], r[i][0], r[i][0]-d[i][0],
MAX_PRECISION - significand_match( d[i][0], r[i][0] ) );
- _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf("%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][1], r[i][1], r[i][1]-d[i][1],
MAX_PRECISION - significand_match( d[i][1], r[i][1] ) );
- _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf("%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][2], r[i][2], r[i][2]-d[i][2],
MAX_PRECISION - significand_match( d[i][2], r[i][2] ) );
- _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n",
+ printf("%f \t %f \t [diff = %e - %i bit missed]\n",
d[i][3], r[i][3], r[i][3]-d[i][3],
MAX_PRECISION - significand_match( d[i][3], r[i][3] ) );
return 0;
@@ -292,19 +292,19 @@ void _math_test_all_transform_functions( char *description )
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf("counter overhead: %lu cycles\n\n", counter_overhead );
+ printf("counter overhead: %lu cycles\n\n", counter_overhead );
}
- _mesa_printf("transform results after hooking in %s functions:\n", description );
+ printf("transform results after hooking in %s functions:\n", description );
}
#endif
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf("\n" );
+ printf("\n" );
for ( psize = 1 ; psize <= 4 ; psize++ ) {
- _mesa_printf(" p%d\t", psize );
+ printf(" p%d\t", psize );
}
- _mesa_printf("\n--------------------------------------------------------\n" );
+ printf("\n--------------------------------------------------------\n" );
}
#endif
@@ -315,23 +315,23 @@ void _math_test_all_transform_functions( char *description )
if ( test_transform_function( func, psize, mtype, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)",
- psize, mstrings[mtype], description );
+ sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)",
+ psize, mstrings[mtype], description );
_mesa_problem( NULL, buf );
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(" %li\t", benchmark_tab[psize-1][mtype] );
+ printf(" %li\t", benchmark_tab[psize-1][mtype] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(" | [%s]\n", mstrings[mtype] );
+ printf(" | [%s]\n", mstrings[mtype] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf( "\n" );
+ printf( "\n" );
#endif
}
diff --git a/src/mesa/math/m_vector.c b/src/mesa/math/m_vector.c
index 4cbab11a358..65c381f383e 100644
--- a/src/mesa/math/m_vector.c
+++ b/src/mesa/math/m_vector.c
@@ -148,27 +148,27 @@ _mesa_vector4f_print( const GLvector4f *v, const GLubyte *cullmask,
GLfloat *d = (GLfloat *)v->data;
GLuint j, i = 0, count;
- _mesa_printf("data-start\n");
+ printf("data-start\n");
for (; d != v->start; STRIDE_F(d, v->stride), i++)
- _mesa_printf(t, i, d[0], d[1], d[2], d[3]);
+ printf(t, i, d[0], d[1], d[2], d[3]);
- _mesa_printf("start-count(%u)\n", v->count);
+ printf("start-count(%u)\n", v->count);
count = i + v->count;
if (culling) {
for (; i < count; STRIDE_F(d, v->stride), i++)
if (cullmask[i])
- _mesa_printf(t, i, d[0], d[1], d[2], d[3]);
+ printf(t, i, d[0], d[1], d[2], d[3]);
}
else {
for (; i < count; STRIDE_F(d, v->stride), i++)
- _mesa_printf(t, i, d[0], d[1], d[2], d[3]);
+ printf(t, i, d[0], d[1], d[2], d[3]);
}
for (j = v->size; j < 4; j++) {
if ((v->flags & (1<<j)) == 0) {
- _mesa_printf("checking col %u is clean as advertised ", j);
+ printf("checking col %u is clean as advertised ", j);
for (i = 0, d = (GLfloat *) v->data;
i < count && d[j] == c[j];
@@ -177,9 +177,9 @@ _mesa_vector4f_print( const GLvector4f *v, const GLubyte *cullmask,
}
if (i == count)
- _mesa_printf(" --> ok\n");
+ printf(" --> ok\n");
else
- _mesa_printf(" --> Failed at %u ******\n", i);
+ printf(" --> Failed at %u ******\n", i);
}
}
}