-/* $Id: m_debug_clip.c,v 1.5 2002/10/30 20:25:15 brianp Exp $ */
+/* $Id: m_debug_clip.c,v 1.6 2002/12/04 14:24:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
if ( dco != rco ) {
- _mesa_printf(NULL, "\n-----------------------------\n" );
- _mesa_printf(NULL, "dco = 0x%02x rco = 0x%02x\n", dco, rco );
+ _mesa_printf( "\n-----------------------------\n" );
+ _mesa_printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco );
return 0;
}
if ( dca != rca ) {
- _mesa_printf(NULL, "\n-----------------------------\n" );
- _mesa_printf(NULL, "dca = 0x%02x rca = 0x%02x\n", dca, rca );
+ _mesa_printf( "\n-----------------------------\n" );
+ _mesa_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(NULL, "\n-----------------------------\n" );
- _mesa_printf(NULL, "(i = %i)\n", i );
- _mesa_printf(NULL, "dm = 0x%02x rm = 0x%02x\n", 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] );
return 0;
}
}
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(NULL, "\n-----------------------------\n" );
- _mesa_printf(NULL, "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n",
+ _mesa_printf( "\n-----------------------------\n" );
+ _mesa_printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n",
i, j, dm[i], rm[i] );
- _mesa_printf(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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;
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf(NULL, "counter overhead: %ld cycles\n\n", counter_overhead );
+ _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead );
}
- _mesa_printf(NULL, "cliptest results after hooking in %s functions:\n", description );
+ _mesa_printf( "cliptest results after hooking in %s functions:\n", description );
}
#endif
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf(NULL, "\n\t" );
+ _mesa_printf( "\n\t" );
for ( psize = 2 ; psize <= 4 ; psize++ ) {
- _mesa_printf(NULL, " p%d\t", psize );
+ _mesa_printf( " p%d\t", psize );
}
- _mesa_printf(NULL, "\n--------------------------------------------------------\n\t" );
+ _mesa_printf( "\n--------------------------------------------------------\n\t" );
}
#endif
if ( test_cliptest_function( func, np, psize, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf(NULL, buf, "%s[%d] failed test (%s)",
+ _mesa_sprintf( buf, "%s[%d] failed test (%s)",
cnames[np], psize, description );
_mesa_problem( NULL, buf );
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(NULL, " %li\t", benchmark_tab[np][psize-1] );
+ _mesa_printf( " %li\t", benchmark_tab[np][psize-1] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(NULL, " | [%s]\n\t", cstrings[np] );
+ _mesa_printf( " | [%s]\n\t", cstrings[np] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(NULL, "\n" );
+ _mesa_printf( "\n" );
#endif
}
-/* $Id: m_debug_norm.c,v 1.11 2002/10/29 20:28:59 brianp Exp $ */
+/* $Id: m_debug_norm.c,v 1.12 2002/12/04 14:24:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
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(NULL, "-----------------------------\n" );
- _mesa_printf(NULL, "(i = %i, j = %i)\n", i, j );
- _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _mesa_printf( "-----------------------------\n" );
+ _mesa_printf( "(i = %i, j = %i)\n", i, j );
+ _mesa_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(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _mesa_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;
if ( norm_normalize_types[mtype] != 0 ) {
if ( significand_match( d2[i][j], r2[i][j] ) < REQUIRED_PRECISION ) {
- _mesa_printf(NULL, "------------------- precalculated length case ------\n" );
- _mesa_printf(NULL, "(i = %i, j = %i)\n", i, j );
- _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _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",
d2[i][0], r2[i][0], r2[i][0]/d2[i][0],
MAX_PRECISION - significand_match( d2[i][0], r2[i][0] ) );
- _mesa_printf(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [ratio = %e - %i bit missed]\n",
+ _mesa_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;
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf(NULL, "counter overhead: %ld cycles\n\n", counter_overhead );
+ _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead );
}
- _mesa_printf(NULL, "normal transform results after hooking in %s functions:\n",
+ _mesa_printf( "normal transform results after hooking in %s functions:\n",
description );
- _mesa_printf(NULL, "\n-------------------------------------------------------\n" );
+ _mesa_printf( "\n-------------------------------------------------------\n" );
}
#endif
if ( test_norm_function( func, mtype, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf(NULL, buf, "_mesa_normal_tab[0][%s] failed test (%s)",
+ _mesa_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(NULL, " %li\t", benchmark_tab[mtype] );
- _mesa_printf(NULL, " | [%s]\n", norm_strings[mtype] );
+ _mesa_printf( " %li\t", benchmark_tab[mtype] );
+ _mesa_printf( " | [%s]\n", norm_strings[mtype] );
}
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf(NULL, "\n" );
+ _mesa_printf( "\n" );
fflush( stdout );
}
#endif
-/* $Id: m_debug_xform.c,v 1.10 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: m_debug_xform.c,v 1.11 2002/12/04 14:24:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
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(NULL, "-----------------------------\n" );
- _mesa_printf(NULL, "(i = %i, j = %i)\n", i, j );
- _mesa_printf(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_printf("-----------------------------\n" );
+ _mesa_printf("(i = %i, j = %i)\n", i, j );
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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(NULL, "%f \t %f \t [diff = %e - %i bit missed]\n",
+ _mesa_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;
if ( mesa_profile ) {
if ( !counter_overhead ) {
INIT_COUNTER();
- _mesa_printf(NULL, "counter overhead: %ld cycles\n\n", counter_overhead );
+ _mesa_printf("counter overhead: %ld cycles\n\n", counter_overhead );
}
- _mesa_printf(NULL, "transform results after hooking in %s functions:\n", description );
+ _mesa_printf("transform results after hooking in %s functions:\n", description );
}
#endif
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- _mesa_printf(NULL, "\n" );
+ _mesa_printf("\n" );
for ( psize = 1 ; psize <= 4 ; psize++ ) {
- _mesa_printf(NULL, " p%d\t", psize );
+ _mesa_printf(" p%d\t", psize );
}
- _mesa_printf(NULL, "\n--------------------------------------------------------\n" );
+ _mesa_printf("\n--------------------------------------------------------\n" );
}
#endif
if ( test_transform_function( func, psize, mtype, cycles ) == 0 ) {
char buf[100];
- _mesa_sprintf(NULL, buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)",
+ _mesa_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(NULL, " %li\t", benchmark_tab[psize-1][mtype] );
+ _mesa_printf(" %li\t", benchmark_tab[psize-1][mtype] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(NULL, " | [%s]\n", mstrings[mtype] );
+ _mesa_printf(" | [%s]\n", mstrings[mtype] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- _mesa_printf(NULL, "\n" );
+ _mesa_printf( "\n" );
#endif
}
-/* $Id: m_vector.c,v 1.8 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: m_vector.c,v 1.9 2002/12/04 14:24:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLfloat *d = (GLfloat *)v->data;
GLuint j, i = 0, count;
- _mesa_printf(NULL, "data-start\n");
+ _mesa_printf("data-start\n");
for ( ; d != v->start ; STRIDE_F(d, v->stride), i++)
- _mesa_printf(NULL, t, i, d[0], d[1], d[2], d[3]);
+ _mesa_printf(t, i, d[0], d[1], d[2], d[3]);
- _mesa_printf(NULL, "start-count(%u)\n", v->count);
+ _mesa_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(NULL, t, i, d[0], d[1], d[2], d[3]);
+ _mesa_printf(t, i, d[0], d[1], d[2], d[3]);
}
else {
for ( ; i < count ; STRIDE_F(d, v->stride), i++)
- _mesa_printf(NULL, t, i, d[0], d[1], d[2], d[3]);
+ _mesa_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(NULL, "checking col %u is clean as advertised ", j);
+ _mesa_printf("checking col %u is clean as advertised ", j);
for (i = 0, d = (GLfloat *) v->data ;
i < count && d[j] == c[j] ;
i++, STRIDE_F(d, v->stride)) {};
if (i == count)
- _mesa_printf(NULL, " --> ok\n");
+ _mesa_printf(" --> ok\n");
else
- _mesa_printf(NULL, " --> Failed at %u ******\n", i);
+ _mesa_printf(" --> Failed at %u ******\n", i);
}
}
}
GLfloat *d = (GLfloat *)v->data;
GLuint i = 0, count;
- _mesa_printf(NULL, "data-start\n");
+ _mesa_printf("data-start\n");
for ( ; d != v->start ; STRIDE_F(d,v->stride), i++)
- _mesa_printf(NULL, "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
+ _mesa_printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
- _mesa_printf(NULL, "start-count(%u)\n", v->count);
+ _mesa_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(NULL, "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
+ _mesa_printf("%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
}
else {
for ( ; i < count ; STRIDE_F(d,v->stride), i++)
- _mesa_printf(NULL, "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
+ _mesa_printf("%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
}
}