summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_imm_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_imm_debug.c')
-rw-r--r--src/mesa/tnl/t_imm_debug.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/mesa/tnl/t_imm_debug.c b/src/mesa/tnl/t_imm_debug.c
index ea57548505d..5def0d73a7b 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");
}
}