summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-29 19:48:15 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-29 19:48:15 +0000
commit4e9676fb13f60ecdbc247b120031f18cd3febcb0 (patch)
tree9f310d4b547592b025b5a7063aaf2b629bef6676 /src/mesa/tnl
parentf1ad551604122dd2679dbd31ae6b2fa1197e9848 (diff)
Applied Matt Sealey's patch to remove/isolate all stdio.h function calls.
Instead of mstdio.[ch], use imports.[ch] to isolate these functions.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_array_api.c10
-rw-r--r--src/mesa/tnl/t_array_import.c4
-rw-r--r--src/mesa/tnl/t_imm_debug.c45
-rw-r--r--src/mesa/tnl/t_imm_fixup.c18
-rw-r--r--src/mesa/tnl/t_vb_render.c4
-rw-r--r--src/mesa/tnl/t_vb_texgen.c4
-rw-r--r--src/mesa/tnl/t_vtx_api.c4
-rw-r--r--src/mesa/tnl/t_vtx_exec.c36
-rw-r--r--src/mesa/tnl/t_vtx_x86.c26
9 files changed, 76 insertions, 75 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c
index 9be6c94793..e2b37ccfb4 100644
--- a/src/mesa/tnl/t_array_api.c
+++ b/src/mesa/tnl/t_array_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_api.c,v 1.26 2002/04/19 00:45:50 brianp Exp $ */
+/* $Id: t_array_api.c,v 1.27 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -80,7 +80,7 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
TNLcontext *tnl = TNL_CONTEXT(ctx);
FLUSH_CURRENT( ctx, 0 );
- /* fprintf(stderr, "%s\n", __FUNCTION__); */
+ /* _mesa_debug(ctx, "%s\n", __FUNCTION__); */
if (tnl->pipeline.build_state_changes)
_tnl_validate_pipeline( ctx );
@@ -116,7 +116,7 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
GLuint thresh = (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) ? 30 : 10;
if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "_tnl_DrawArrays %d %d\n", start, count);
+ _mesa_debug(NULL, "_tnl_DrawArrays %d %d\n", start, count);
/* Check arguments, etc.
*/
@@ -252,7 +252,7 @@ _tnl_DrawRangeElements(GLenum mode,
GLuint *ui_indices;
if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "_tnl_DrawRangeElements %d %d %d\n", start, end, count);
+ _mesa_debug(NULL, "_tnl_DrawRangeElements %d %d %d\n", start, end, count);
/* Check arguments, etc.
*/
@@ -319,7 +319,7 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
GLuint *ui_indices;
if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "_tnl_DrawElements %d\n", count);
+ _mesa_debug(NULL, "_tnl_DrawElements %d\n", count);
/* Check arguments, etc.
*/
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 082ae4ad3c..b949bc639a 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_import.c,v 1.24 2002/04/21 20:37:04 brianp Exp $ */
+/* $Id: t_array_import.c,v 1.25 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -340,7 +340,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
GLuint inputs = tnl->pipeline.inputs;
struct vertex_arrays *tmp = &tnl->array_inputs;
-/* fprintf(stderr, "%s %d..%d // %d..%d\n", __FUNCTION__, */
+/* _mesa_debug(ctx, "%s %d..%d // %d..%d\n", __FUNCTION__, */
/* start, count, ctx->Array.LockFirst, ctx->Array.LockCount); */
/* _tnl_print_vert_flags(" inputs", inputs); */
/* _tnl_print_vert_flags(" _Enabled", ctx->Array._Enabled); */
diff --git a/src/mesa/tnl/t_imm_debug.c b/src/mesa/tnl/t_imm_debug.c
index ea57548505..5def0d73a7 100644
--- a/src/mesa/tnl/t_imm_debug.c
+++ b/src/mesa/tnl/t_imm_debug.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_debug.c,v 1.7 2002/01/22 14:35:16 brianp Exp $ */
+/* $Id: t_imm_debug.c,v 1.8 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -25,12 +25,13 @@
*/
#include "mtypes.h"
+#include "context.h"
#include "t_context.h"
#include "t_imm_debug.h"
void _tnl_print_vert_flags( const char *name, GLuint flags )
{
- fprintf(stderr,
+ _mesa_debug(NULL,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
name,
flags,
@@ -70,7 +71,7 @@ void _tnl_print_cassette( struct immediate *IM )
GLuint state = IM->BeginState;
GLuint req = ~0;
- fprintf(stderr, "Cassette id %d, %u rows.\n", IM->id,
+ _mesa_debug(NULL, "Cassette id %d, %u rows.\n", IM->id,
IM->Count - IM->CopyStart);
_tnl_print_vert_flags("Contains at least one", orflag);
@@ -79,7 +80,7 @@ void _tnl_print_cassette( struct immediate *IM )
{
_tnl_print_vert_flags("Contains a full complement of", andflag);
- fprintf(stderr, "Final begin/end state %s/%s, errors %s/%s\n",
+ _mesa_debug(NULL, "Final begin/end state %s/%s, errors %s/%s\n",
(state & VERT_BEGIN_0) ? "in" : "out",
(state & VERT_BEGIN_1) ? "in" : "out",
(state & VERT_ERROR_0) ? "y" : "n",
@@ -88,24 +89,24 @@ void _tnl_print_cassette( struct immediate *IM )
}
for (i = IM->CopyStart ; i <= IM->Count ; i++) {
- fprintf(stderr, "%u: ", i);
+ _mesa_debug(NULL, "%u: ", i);
if (req & VERT_BITS_OBJ_234) {
if (flags[i] & VERT_BIT_EVAL_C1)
- fprintf(stderr, "EvalCoord %f ",
+ _mesa_debug(NULL, "EvalCoord %f ",
IM->Attrib[VERT_ATTRIB_POS][i][0]);
else if (flags[i] & VERT_BIT_EVAL_P1)
- fprintf(stderr, "EvalPoint %.0f ",
+ _mesa_debug(NULL, "EvalPoint %.0f ",
IM->Attrib[VERT_ATTRIB_POS][i][0]);
else if (flags[i] & VERT_BIT_EVAL_C2)
- fprintf(stderr, "EvalCoord %f %f ",
+ _mesa_debug(NULL, "EvalCoord %f %f ",
IM->Attrib[VERT_ATTRIB_POS][i][0],
IM->Attrib[VERT_ATTRIB_POS][i][1]);
else if (flags[i] & VERT_BIT_EVAL_P2)
- fprintf(stderr, "EvalPoint %.0f %.0f ",
+ _mesa_debug(NULL, "EvalPoint %.0f %.0f ",
IM->Attrib[VERT_ATTRIB_POS][i][0],
IM->Attrib[VERT_ATTRIB_POS][i][1]);
else if (i < IM->Count && (flags[i] & VERT_BITS_OBJ_234)) {
- fprintf(stderr, "Obj %f %f %f %f",
+ _mesa_debug(NULL, "Obj %f %f %f %f",
IM->Attrib[VERT_ATTRIB_POS][i][0],
IM->Attrib[VERT_ATTRIB_POS][i][1],
IM->Attrib[VERT_ATTRIB_POS][i][2],
@@ -114,10 +115,10 @@ void _tnl_print_cassette( struct immediate *IM )
}
if (req & flags[i] & VERT_BIT_ELT)
- fprintf(stderr, " Elt %u\t", IM->Elt[i]);
+ _mesa_debug(NULL, " Elt %u\t", IM->Elt[i]);
if (req & flags[i] & VERT_BIT_NORMAL)
- fprintf(stderr, " Norm %f %f %f ",
+ _mesa_debug(NULL, " Norm %f %f %f ",
IM->Attrib[VERT_ATTRIB_NORMAL][i][0],
IM->Attrib[VERT_ATTRIB_NORMAL][i][1],
IM->Attrib[VERT_ATTRIB_NORMAL][i][2]);
@@ -126,7 +127,7 @@ void _tnl_print_cassette( struct immediate *IM )
GLuint j;
for (j = 0 ; j < MAX_TEXTURE_UNITS ; j++) {
if (req & flags[i] & VERT_BIT_TEX(j)) {
- fprintf(stderr, "TC%d %f %f %f %f", j,
+ _mesa_debug(NULL, "TC%d %f %f %f %f", j,
IM->Attrib[VERT_ATTRIB_TEX0 + j][i][0],
IM->Attrib[VERT_ATTRIB_TEX0 + j][i][1],
IM->Attrib[VERT_ATTRIB_TEX0 + j][i][2],
@@ -136,45 +137,45 @@ void _tnl_print_cassette( struct immediate *IM )
}
if (req & flags[i] & VERT_BIT_COLOR0)
- fprintf(stderr, " Rgba %f %f %f %f ",
+ _mesa_debug(NULL, " Rgba %f %f %f %f ",
IM->Attrib[VERT_ATTRIB_COLOR0][i][0],
IM->Attrib[VERT_ATTRIB_COLOR0][i][1],
IM->Attrib[VERT_ATTRIB_COLOR0][i][2],
IM->Attrib[VERT_ATTRIB_COLOR0][i][3]);
if (req & flags[i] & VERT_BIT_COLOR1)
- fprintf(stderr, " Spec %f %f %f ",
+ _mesa_debug(NULL, " Spec %f %f %f ",
IM->Attrib[VERT_ATTRIB_COLOR1][i][0],
IM->Attrib[VERT_ATTRIB_COLOR1][i][1],
IM->Attrib[VERT_ATTRIB_COLOR1][i][2]);
if (req & flags[i] & VERT_BIT_FOG)
- fprintf(stderr, " Fog %f ", IM->Attrib[VERT_ATTRIB_FOG][i][0]);
+ _mesa_debug(NULL, " Fog %f ", IM->Attrib[VERT_ATTRIB_FOG][i][0]);
if (req & flags[i] & VERT_BIT_INDEX)
- fprintf(stderr, " Index %u ", IM->Index[i]);
+ _mesa_debug(NULL, " Index %u ", IM->Index[i]);
if (req & flags[i] & VERT_BIT_EDGEFLAG)
- fprintf(stderr, " Edgeflag %d ", IM->EdgeFlag[i]);
+ _mesa_debug(NULL, " Edgeflag %d ", IM->EdgeFlag[i]);
if (req & flags[i] & VERT_BIT_MATERIAL)
- fprintf(stderr, " Material ");
+ _mesa_debug(NULL, " Material ");
/* The order of these two is not easily knowable, but this is
* the usually correct way to look at them.
*/
if (req & flags[i] & VERT_BIT_END)
- fprintf(stderr, " END ");
+ _mesa_debug(NULL, " END ");
if (req & flags[i] & VERT_BIT_BEGIN)
- fprintf(stderr, " BEGIN(%s) (%s%s%s%s)",
+ _mesa_debug(NULL, " BEGIN(%s) (%s%s%s%s)",
_mesa_prim_name[IM->Primitive[i] & PRIM_MODE_MASK],
(IM->Primitive[i] & PRIM_LAST) ? "LAST," : "",
(IM->Primitive[i] & PRIM_BEGIN) ? "BEGIN," : "",
(IM->Primitive[i] & PRIM_END) ? "END," : "",
(IM->Primitive[i] & PRIM_PARITY) ? "PARITY," : "");
- fprintf(stderr, "\n");
+ _mesa_debug(NULL, "\n");
}
}
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c
index d46f0a5baf..007a2130a5 100644
--- a/src/mesa/tnl/t_imm_fixup.c
+++ b/src/mesa/tnl/t_imm_fixup.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_fixup.c,v 1.36 2002/04/19 12:32:14 brianp Exp $ */
+/* $Id: t_imm_fixup.c,v 1.37 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -78,7 +78,7 @@ _tnl_fixup_3f( float data[][3], GLuint flag[], GLuint start, GLuint match )
for (;;) {
if ((flag[++i] & match) == 0) {
-/* fprintf(stderr, "_tnl_fixup_3f copy to %p values %f %f %f\n", */
+/* _mesa_debug(NULL, "_tnl_fixup_3f copy to %p values %f %f %f\n", */
/* data[i], */
/* data[i-1][0], */
/* data[i-1][1], */
@@ -153,7 +153,7 @@ fixup_first_3f( GLfloat data[][3], GLuint flag[], GLuint match,
GLuint i = start-1;
match |= VERT_BIT_END_VB;
-/* fprintf(stderr, "fixup_first_3f default: %f %f %f start: %d\n", */
+/* _mesa_debug(NULL, "fixup_first_3f default: %f %f %f start: %d\n", */
/* dflt[0], dflt[1], dflt[2], start); */
while ((flag[++i]&match) == 0)
@@ -260,7 +260,7 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
IM->CopyTexSize = IM->TexSize;
-/* fprintf(stderr, "Fixup input, Start: %u Count: %u LastData: %u\n", */
+/* _mesa_debug(ctx, "Fixup input, Start: %u Count: %u LastData: %u\n", */
/* IM->Start, IM->Count, IM->LastData); */
/* _tnl_print_vert_flags("Orflag", orflag); */
/* _tnl_print_vert_flags("Andflag", andflag); */
@@ -397,7 +397,7 @@ copy_material( struct immediate *next,
struct immediate *prev,
GLuint dst, GLuint src )
{
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug(NULL, "%s\n", __FUNCTION__); */
if (next->Material == 0) {
next->Material = (struct gl_material (*)[2])
@@ -466,7 +466,7 @@ void _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *next )
next->Flag[dst] = VERT_BIT_ELT;
elts[i+offset] = dst;
}
-/* fprintf(stderr, "ADDING VERT_BIT_ELT!\n"); */
+/* _mesa_debug(ctx, "ADDING VERT_BIT_ELT!\n"); */
next->CopyOrFlag |= VERT_BIT_ELT;
next->CopyAndFlag &= VERT_BIT_ELT;
}
@@ -509,7 +509,7 @@ void _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *next )
inputs->Obj.data[isrc] );
if (copy & VERT_BIT_NORMAL) {
-/* fprintf(stderr, "copy vert norm %d to %d (%p): %f %f %f\n", */
+/* _mesa_debug(ctx, "copy vert norm %d to %d (%p): %f %f %f\n", */
/* isrc, dst, */
/* next->Normal[dst], */
/* inputs->Normal.data[isrc][0], */
@@ -578,7 +578,7 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
GLuint fixup;
GLuint start = IM->Start;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug(ctx, "%s\n", __FUNCTION__); */
IM->Evaluated = 0;
IM->CopyOrFlag = IM->OrFlag;
@@ -768,7 +768,7 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
GLuint pintro = intro[prim];
GLuint ovf = 0;
-/* fprintf(stderr, "_tnl_get_exec_copy_verts %s\n", */
+/* _mesa_debug(ctx, "_tnl_get_exec_copy_verts %s\n", */
/* _mesa_lookup_enum_by_nr(prim)); */
if (tnl->ExecCopySource)
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 361a2fa442..687f286f98 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_render.c,v 1.30 2002/06/15 03:03:12 brianp Exp $ */
+/* $Id: t_vb_render.c,v 1.31 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -327,7 +327,7 @@ static GLboolean run_render( GLcontext *ctx,
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (MESA_VERBOSE & VERBOSE_PRIMS)
- fprintf(stderr, "MESA prim %s %d..%d\n",
+ _mesa_debug(NULL, "MESA prim %s %d..%d\n",
_mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK),
i, i+length);
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index f04d36c41a..81751508bf 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_texgen.c,v 1.12 2002/01/22 14:35:17 brianp Exp $ */
+/* $Id: t_vb_texgen.c,v 1.13 2002/06/29 19:48:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -322,7 +322,7 @@ static void texgen_sphere_map( GLcontext *ctx,
GLfloat (*f)[3] = store->tmp_f;
GLfloat *m = store->tmp_m;
-/* fprintf(stderr, "%s normstride %d eyestride %d\n", */
+/* _mesa_debug(NULL, "%s normstride %d eyestride %d\n", */
/* __FUNCTION__, VB->NormalPtr->stride, */
/* VB->EyePtr->stride); */
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c
index b957f33669..4076051c87 100644
--- a/src/mesa/tnl/t_vtx_api.c
+++ b/src/mesa/tnl/t_vtx_api.c
@@ -619,13 +619,13 @@ static void choose_##FN ARGS1 \
if (dfn == 0) \
dfn = tnl->codegen.FN( &vb, key ); \
else if (MESA_VERBOSE & DEBUG_CODEGEN) \
- fprintf(stderr, "%s -- cached codegen\n", __FUNCTION__ ); \
+ _mesa_debug(NULL, "%s -- cached codegen\n", __FUNCTION__ ); \
\
if (dfn) \
tnl->context->Exec->FN = (FNTYPE)(dfn->code); \
else { \
if (MESA_VERBOSE & DEBUG_CODEGEN) \
- fprintf(stderr, "%s -- generic version\n", __FUNCTION__ ); \
+ _mesa_debug(NULL, "%s -- generic version\n", __FUNCTION__ ); \
tnl->context->Exec->FN = tnl_##FN; \
} \
\
diff --git a/src/mesa/tnl/t_vtx_exec.c b/src/mesa/tnl/t_vtx_exec.c
index b9eb5bde8d..f0e316ce3e 100644
--- a/src/mesa/tnl/t_vtx_exec.c
+++ b/src/mesa/tnl/t_vtx_exec.c
@@ -144,7 +144,7 @@ static void flush_prims( TNLcontext *tnl )
static void start_prim( TNLcontext *tnl, GLuint mode )
{
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s %d\n", __FUNCTION__,
+ _mesa_debug(NULL, "%s %d\n", __FUNCTION__,
tnl->initial_counter - tnl->counter);
tnl->primlist[tnl->nrprims].start = tnl->initial_counter - tnl->counter;
@@ -154,7 +154,7 @@ static void start_prim( TNLcontext *tnl, GLuint mode )
static void note_last_prim( TNLcontext *tnl, GLuint flags )
{
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s %d\n", __FUNCTION__,
+ _mesa_debug(NULL, "%s %d\n", __FUNCTION__,
tnl->initial_counter - tnl->counter);
if (tnl->prim[0] != GL_POLYGON+1) {
@@ -176,7 +176,7 @@ static void copy_vertex( TNLcontext *tnl, GLuint n, GLfloat *dst )
tnl->vertex_size * 4);
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "copy_vertex %d\n",
+ _mesa_debug(NULL, "copy_vertex %d\n",
tnl->primlist[tnl->nrprims].start + n);
for (i = 0 ; i < tnl->vertex_size; i++) {
@@ -190,7 +190,7 @@ static GLuint copy_wrapped_verts( TNLcontext *tnl, GLfloat (*tmp)[15] )
GLuint nr = (tnl->initial_counter - tnl->counter) - tnl->primlist[tnl->nrprims].start;
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s %d verts\n", __FUNCTION__, nr);
+ _mesa_debug(NULL, "%s %d verts\n", __FUNCTION__, nr);
switch( tnl->prim[0] )
{
@@ -257,7 +257,7 @@ static void wrap_buffer( void )
GLuint i, nrverts;
if (MESA_VERBOSE & (DEBUG_VFMT|DEBUG_PRIMS))
- fprintf(stderr, "%s %d\n", __FUNCTION__,
+ _mesa_debug(NULL, "%s %d\n", __FUNCTION__,
tnl->initial_counter - tnl->counter);
/* Don't deal with parity. *** WONT WORK FOR COMPILE
@@ -274,7 +274,7 @@ static void wrap_buffer( void )
nrverts = copy_dma_verts( tnl, tmp );
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%d vertices to copy\n", nrverts);
+ _mesa_debug(NULL, "%d vertices to copy\n", nrverts);
/* Finish the prim at this point:
@@ -302,10 +302,10 @@ static void wrap_buffer( void )
for (i = 0 ; i < nrverts; i++) {
if (MESA_VERBOSE & DEBUG_VERTS) {
int j;
- fprintf(stderr, "re-emit vertex %d to %p\n", i, tnl->dmaptr);
+ _mesa_debug(NULL, "re-emit vertex %d to %p\n", i, tnl->dmaptr);
if (MESA_VERBOSE & DEBUG_VERBOSE)
for (j = 0 ; j < tnl->vertex_size; j++)
- fprintf(stderr, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]);
+ _mesa_debug(NULL, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]);
}
memcpy( tnl->dmaptr, tmp[i], tnl->vertex_size * 4 );
@@ -371,7 +371,7 @@ static GLboolean check_vtx_fmt( GLcontext *ctx )
if (tnl->installed_vertex_format != tnl->vertex_format) {
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "reinstall on vertex_format change\n");
+ _mesa_debug(NULL, "reinstall on vertex_format change\n");
_mesa_install_exec_vtxfmt( ctx, &tnl->vtxfmt );
tnl->installed_vertex_format = tnl->vertex_format;
}
@@ -392,7 +392,7 @@ void _tnl_InvalidateVtxfmt( GLcontext *ctx )
static void _tnl_ValidateVtxfmt( GLcontext *ctx )
{
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s\n", __FUNCTION__);
if (ctx->Driver.NeedFlush)
ctx->Driver.FlushVertices( ctx, ctx->Driver.NeedFlush );
@@ -402,18 +402,18 @@ static void _tnl_ValidateVtxfmt( GLcontext *ctx )
if (check_vtx_fmt( ctx )) {
if (!tnl->installed) {
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "reinstall (new install)\n");
+ _mesa_debug(NULL, "reinstall (new install)\n");
_mesa_install_exec_vtxfmt( ctx, &tnl->vtxfmt );
ctx->Driver.FlushVertices = _tnl_FlushVertices;
tnl->installed = GL_TRUE;
}
else
- fprintf(stderr, "%s: already installed", __FUNCTION__);
+ _mesa_debug(NULL, "%s: already installed", __FUNCTION__);
}
else {
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s: failed\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s: failed\n", __FUNCTION__);
if (tnl->installed) {
if (tnl->tnl->dma.flush)
@@ -436,7 +436,7 @@ static void _tnl_Begin( GLenum mode )
TNLcontext *tnl = tnl->tnl;
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s\n", __FUNCTION__);
if (mode > GL_POLYGON) {
_mesa_error( ctx, GL_INVALID_ENUM, "glBegin" );
@@ -456,7 +456,7 @@ static void _tnl_Begin( GLenum mode )
if (tnl->dma.flush && tnl->counter < 12) {
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s: flush almost-empty buffers\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s: flush almost-empty buffers\n", __FUNCTION__);
flush_prims( tnl );
}
@@ -492,7 +492,7 @@ static void _tnl_End( void )
GLcontext *ctx = tnl->context;
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s\n", __FUNCTION__);
if (tnl->prim[0] == GL_POLYGON+1) {
_mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" );
@@ -507,14 +507,14 @@ static void _tnl_End( void )
static void _tnl_FlushVertices( GLcontext *ctx, GLuint flags )
{
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ _mesa_debug(NULL, "%s\n", __FUNCTION__);
assert(tnl->installed);
if (flags & FLUSH_UPDATE_CURRENT) {
_tnl_copy_to_current( ctx );
if (MESA_VERBOSE & DEBUG_VFMT)
- fprintf(stderr, "reinstall on update_current\n");
+ _mesa_debug(NULL, "reinstall on update_current\n");
_mesa_install_exec_vtxfmt( ctx, &tnl->vtxfmt );
ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT;
}
diff --git a/src/mesa/tnl/t_vtx_x86.c b/src/mesa/tnl/t_vtx_x86.c
index 05cad62902..4e4596a4e6 100644
--- a/src/mesa/tnl/t_vtx_x86.c
+++ b/src/mesa/tnl/t_vtx_x86.c
@@ -46,7 +46,7 @@ struct dynfn *tnl_makeX86Vertex2f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (RADEON_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
switch (tnl->vertex_size) {
default: {
@@ -104,7 +104,7 @@ struct dynfn *tnl_makeX86Vertex3f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (RADEON_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
switch (tnl->vertex_size) {
case 4: {
@@ -232,7 +232,7 @@ struct dynfn *tnl_makeX86Vertex3fv( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
switch (tnl->vertex_size) {
case 6: {
@@ -391,7 +391,7 @@ struct dynfn *tnl_makeX86Attr4fv( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.Normal3fv, dfn );
dfn->key = key;
@@ -419,7 +419,7 @@ struct dynfn *tnl_makeX86Attr4f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.Normal3f, dfn );
dfn->key = key;
@@ -447,7 +447,7 @@ struct dynfn *tnl_makeX86Attr3fv( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.Normal3fv, dfn );
dfn->key = key;
@@ -473,7 +473,7 @@ struct dynfn *tnl_makeX86Attr3f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.Normal3f, dfn );
dfn->key = key;
@@ -490,7 +490,7 @@ struct dynfn *tnl_makeX86Attr4ubv( TNLcontext *tnl, int key )
dfn->key = key;
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
if (key & TNL_CP_VC_FRMT_PKCOLOR) {
static char temp[] = {
@@ -547,7 +547,7 @@ struct dynfn *tnl_makeX86Attr4ubv( TNLcontext *tnl, int key )
struct dynfn *tnl_makeX86Attr4ub( TNLcontext *tnl, int key )
{
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
if (key & TNL_CP_VC_FRMT_PKCOLOR) {
/* XXX push/pop */
@@ -598,7 +598,7 @@ struct dynfn *tnl_makeX86Attr2fv( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.TexCoord2fv, dfn );
dfn->key = key;
@@ -622,7 +622,7 @@ struct dynfn *tnl_makeX86Attr2f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.TexCoord2f, dfn );
dfn->key = key;
@@ -646,7 +646,7 @@ struct dynfn *tnl_makeX86Attr1fv( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.TexCoord2fv, dfn );
dfn->key = key;
@@ -668,7 +668,7 @@ struct dynfn *tnl_makeX86Attr1f( TNLcontext *tnl, int key )
struct dynfn *dfn = MALLOC_STRUCT( dynfn );
if (TNL_DEBUG & DEBUG_CODEGEN)
- fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key );
+ _mesa_debug(NULL, "%s 0x%08x\n", __FUNCTION__, key );
insert_at_head( &tnl->dfn_cache.TexCoord2f, dfn );
dfn->key = key;