summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-13 04:49:17 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-13 04:49:17 +0000
commitd09a1d8b29ae5841ae39b5c24c3f4693dd750559 (patch)
tree4f988f9357fdfbb2b0663861aad395168a4d7227 /src/mesa/tnl
parent2f35d5e9d53165f6baf2d4a7fece3bb39d945323 (diff)
more removal of fprintf() calls
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_imm_api.c23
-rw-r--r--src/mesa/tnl/t_imm_dlist.c15
-rw-r--r--src/mesa/tnl/t_imm_elt.c5
-rw-r--r--src/mesa/tnl/t_imm_eval.c5
-rw-r--r--src/mesa/tnl/t_imm_exec.c12
5 files changed, 24 insertions, 36 deletions
diff --git a/src/mesa/tnl/t_imm_api.c b/src/mesa/tnl/t_imm_api.c
index f477a351b2..5d78d107db 100644
--- a/src/mesa/tnl/t_imm_api.c
+++ b/src/mesa/tnl/t_imm_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_api.c,v 1.27 2002/04/19 12:32:14 brianp Exp $ */
+/* $Id: t_imm_api.c,v 1.28 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -60,8 +60,8 @@ void _tnl_flush_immediate( GLcontext *ctx, struct immediate *IM )
}
if (MESA_VERBOSE & VERBOSE_IMMEDIATE)
- fprintf(stderr, "_tnl_flush_immediate IM: %d compiling: %d\n",
- IM->id, ctx->CompileFlag);
+ _mesa_debug("_tnl_flush_immediate IM: %d compiling: %d\n",
+ IM->id, ctx->CompileFlag);
if (IM->FlushElt == FLUSH_ELT_EAGER) {
_tnl_translate_array_elts( ctx, IM, IM->LastPrimitive, IM->Count );
@@ -86,10 +86,9 @@ void _tnl_flush_vertices( GLcontext *ctx, GLuint flags )
struct immediate *IM = TNL_CURRENT_IM(ctx);
if (MESA_VERBOSE & VERBOSE_IMMEDIATE)
- fprintf( stderr,
- "_tnl_flush_vertices flags %x IM(%d) %d..%d Flag[%d]: %x\n",
- flags, IM->id, IM->Start, IM->Count, IM->Start,
- IM->Flag[IM->Start]);
+ _mesa_debug("_tnl_flush_vertices flags %x IM(%d) %d..%d Flag[%d]: %x\n",
+ flags, IM->id, IM->Start, IM->Count, IM->Start,
+ IM->Flag[IM->Start]);
if (IM->Flag[IM->Start])
if ((flags & FLUSH_UPDATE_CURRENT) || IM->Count > IM->Start)
@@ -106,7 +105,7 @@ _tnl_save_Begin( GLenum mode )
struct immediate *IM = TNL_CURRENT_IM(ctx);
GLuint inflags, state;
-/* fprintf(stderr, "%s: before: %x\n", __FUNCTION__, IM->BeginState); */
+/* _mesa_debug("%s: before: %x\n", __FUNCTION__, IM->BeginState); */
if (mode > GL_POLYGON) {
_mesa_compile_error( ctx, GL_INVALID_ENUM, "_tnl_Begin" );
@@ -224,7 +223,7 @@ _tnl_Begin( GLenum mode )
IM->LastPrimitive = count;
IM->BeginState = (VERT_BEGIN_0|VERT_BEGIN_1);
-/* fprintf(stderr, "%s: %x\n", __FUNCTION__, IM->BeginState); */
+/* _mesa_debug("%s: %x\n", __FUNCTION__, IM->BeginState); */
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
ctx->Driver.CurrentExecPrimitive = mode;
@@ -239,12 +238,12 @@ _tnl_Begin( GLenum mode )
GLboolean
_tnl_hard_begin( GLcontext *ctx, GLenum p )
{
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug("%s\n", __FUNCTION__); */
if (!ctx->CompileFlag) {
/* If not compiling, treat as a normal begin().
*/
-/* fprintf(stderr, "%s: treating as glBegin\n", __FUNCTION__); */
+/* _mesa_debug("%s: treating as glBegin\n", __FUNCTION__); */
glBegin( p );
return GL_TRUE;
}
@@ -1206,7 +1205,7 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
return;
if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "_tnl_Materialfv\n");
+ _mesa_debug("_tnl_Materialfv\n");
if (tnl->IsolateMaterials &&
!(IM->BeginState & VERT_BEGIN_1)) /* heuristic */
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index 94da392804..b269c7597c 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_dlist.c,v 1.40 2002/04/19 00:45:50 brianp Exp $ */
+/* $Id: t_imm_dlist.c,v 1.41 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -129,7 +129,7 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
GLuint new_beginstate;
if (MESA_VERBOSE & VERBOSE_DISPLAY_LIST)
- fprintf(stderr, "_tnl_compiled_cassette IM: %d\n", IM->id);
+ _mesa_debug("_tnl_compiled_cassette IM: %d\n", IM->id);
if (IM->FlushElt) {
ASSERT (IM->FlushElt == FLUSH_ELT_LAZY);
@@ -296,7 +296,7 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
TNLvertexcassette *node = (TNLvertexcassette *)data;
struct immediate *IM = node->IM;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug("%s\n", __FUNCTION__); */
IM->Start = node->Start;
IM->CopyStart = node->Start;
@@ -317,9 +317,8 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
_tnl_print_cassette( IM );
if (MESA_VERBOSE & VERBOSE_DISPLAY_LIST) {
- fprintf(stderr, "Run cassette %d, rows %d..%d, beginstate %x ",
- IM->id,
- IM->Start, IM->Count, IM->BeginState);
+ _mesa_debug("Run cassette %d, rows %d..%d, beginstate %x ",
+ IM->id, IM->Start, IM->Count, IM->BeginState);
_tnl_print_vert_flags("orflag", IM->OrFlag);
}
@@ -401,8 +400,8 @@ print_compiled_cassette( GLcontext *ctx, void *data )
TNLvertexcassette *node = (TNLvertexcassette *)data;
struct immediate *IM = node->IM;
- fprintf(stderr, "TNL-VERTEX-CASSETTE, id %u, rows %u..%u\n",
- node->IM->id, node->Start, node->Count);
+ _mesa_debug("TNL-VERTEX-CASSETTE, id %u, rows %u..%u\n",
+ node->IM->id, node->Start, node->Count);
IM->Start = node->Start;
IM->CopyStart = node->Start;
diff --git a/src/mesa/tnl/t_imm_elt.c b/src/mesa/tnl/t_imm_elt.c
index ff01dc51bb..c7cb0b0a7f 100644
--- a/src/mesa/tnl/t_imm_elt.c
+++ b/src/mesa/tnl/t_imm_elt.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_elt.c,v 1.16 2002/01/22 14:35:16 brianp Exp $ */
+/* $Id: t_imm_elt.c,v 1.17 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,6 +29,7 @@
#include "glheader.h"
#include "colormac.h"
+#include "context.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
@@ -758,7 +759,7 @@ void _tnl_translate_array_elts( GLcontext *ctx, struct immediate *IM,
GLuint i;
if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
- fprintf(stderr, "exec_array_elements %d .. %d\n", start, count);
+ _mesa_debug("exec_array_elements %d .. %d\n", start, count);
if (translate & VERT_BIT_POS) {
_tnl_trans_elt_4f( IM->Attrib[VERT_ATTRIB_POS],
diff --git a/src/mesa/tnl/t_imm_eval.c b/src/mesa/tnl/t_imm_eval.c
index 1b95f15f10..024da18db1 100644
--- a/src/mesa/tnl/t_imm_eval.c
+++ b/src/mesa/tnl/t_imm_eval.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_eval.c,v 1.22 2002/04/09 16:56:52 keithw Exp $ */
+/* $Id: t_imm_eval.c,v 1.23 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -194,8 +194,6 @@ static void eval2_obj_norm( GLvector4f *obj_ptr,
GLfloat (*normal)[4] = norm_ptr->data;
GLuint i;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
for (i = 0 ; !(flags[i] & VERT_BIT_END_VB) ; i++)
if (flags[i] & (VERT_BIT_EVAL_C2|VERT_BIT_EVAL_P2)) {
GLfloat u = (coord[i][0] - u1) * du;
@@ -611,7 +609,6 @@ void _tnl_eval_immediate( GLcontext *ctx, struct immediate *IM )
GLuint generated = 0;
if (copycount) {
-/* fprintf(stderr, "%s: Copy normals\n", __FUNCTION__); */
copy_3f( store->Attrib[VERT_ATTRIB_NORMAL] + IM->CopyStart,
tmp->Normal.data, copycount );
}
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 2480206095..f4ee1501cb 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.39 2002/04/19 12:32:14 brianp Exp $ */
+/* $Id: t_imm_exec.c,v 1.40 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -72,8 +72,7 @@ static void reset_input( GLcontext *ctx,
MEMSET(IM->Flag + start, 0, sizeof(GLuint) * (IM->Count+2-start));
if (MESA_VERBOSE & VERBOSE_IMMEDIATE)
- fprintf(stderr, "reset_input: IM(%d) new %x\n",
- IM->id, beginstate);
+ _mesa_debug("reset_input: IM(%d) new %x\n", IM->id, beginstate);
IM->Start = start;
IM->Count = start;
@@ -409,8 +408,6 @@ void _tnl_run_cassette( GLcontext *ctx, struct immediate *IM )
*/
static void exec_vert_cassette( GLcontext *ctx, struct immediate *IM )
{
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
if (IM->FlushElt) {
/* Orflag is computed twice, but only reach this code if app is
* using a mixture of glArrayElement() and glVertex() while
@@ -436,8 +433,6 @@ static void exec_elt_cassette( GLcontext *ctx, struct immediate *IM )
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
_tnl_vb_bind_arrays( ctx, ctx->Array.LockFirst, ctx->Array.LockCount );
/* Take only elements and primitive information from the immediate:
@@ -518,9 +513,6 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1)
ctx->Driver.NeedFlush &= ~FLUSH_STORED_VERTICES;
-
-/* fprintf(stderr, "%s: NeedFlush: %x\n", __FUNCTION__, */
-/* ctx->Driver.NeedFlush); */
}