X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmath%2Fm_debug_xform.c;h=7d815664a149f10d21354db08d24ee86ad38c727;hb=efdc8bf1894790a85c118881395a998cbae34c1a;hp=df8cc066b6e58dc3ca1f5fe3aaa58ebc482c9707;hpb=ef2bf418b45c7966e9fe78359058b8d44f570be1;p=mesa.git diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index df8cc066b6e..7d815664a14 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -183,7 +183,7 @@ static int test_transform_function( transform_func func, int psize, return 0; } - mat->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + mat->m = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 ); mat->type = mtypes[mtype]; m = mat->m; @@ -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; @@ -273,7 +273,7 @@ static int test_transform_function( transform_func func, int psize, } } - ALIGN_FREE( mat->m ); + _mesa_align_free( mat->m ); return 1; } @@ -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 ); - _mesa_problem( NULL, buf ); + sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)", + psize, mstrings[mtype], description ); + _mesa_problem( NULL, "%s", 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 }