summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_save_api.c26
-rw-r--r--src/mesa/tnl/t_save_playback.c4
-rw-r--r--src/mesa/tnl/t_vtx_api.c10
-rw-r--r--src/mesa/tnl/t_vtx_exec.c21
4 files changed, 24 insertions, 37 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 63a59e77d1b..0a7e31e2ad7 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -474,8 +474,8 @@ static void _save_upgrade_vertex( GLcontext *ctx,
if (tnl->save.currentsz[attr] == 0) {
assert(oldsz == 0);
tnl->save.dangling_attr_ref = attr;
- _mesa_debug(0, "%s: dangling reference attr %d\n",
- __FUNCTION__, attr);
+ _mesa_debug(0, "_save_upgrade_vertex: dangling reference attr %d\n",
+ attr);
#if 0
/* The current strategy is to punt these degenerate cases
@@ -730,7 +730,7 @@ do { \
static void enum_error( void )
{
GET_CURRENT_CONTEXT( ctx );
- _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_compile_error( ctx, GL_INVALID_ENUM, "glVertexAttrib" );
}
static void _save_Vertex2f( GLfloat x, GLfloat y )
@@ -1041,7 +1041,7 @@ static void _save_Materialfv( GLenum face, GLenum pname,
MAT( _TNL_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
break;
default:
- _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_compile_error( ctx, GL_INVALID_ENUM, "glMaterialfv" );
return;
}
}
@@ -1094,7 +1094,7 @@ static void _save_Indexfv( const GLfloat *f )
do { \
TNLcontext *tnl = TNL_CONTEXT(ctx); \
\
- fprintf(stderr, "fallback %s inside begin/end\n", __FUNCTION__); \
+ /*fprintf(stderr, "fallback %s inside begin/end\n", __FUNCTION__);*/ \
\
if (tnl->save.initial_counter != tnl->save.counter || \
tnl->save.prim_count) \
@@ -1151,7 +1151,6 @@ static void _save_EvalPoint2( GLint i, GLint j )
static void _save_CallList( GLuint l )
{
GET_CURRENT_CONTEXT(ctx);
- fprintf(stderr, "%s\n", __FUNCTION__);
FALLBACK(ctx);
ctx->Save->CallList( l );
}
@@ -1159,7 +1158,6 @@ static void _save_CallList( GLuint l )
static void _save_CallLists( GLsizei n, GLenum type, const GLvoid *v )
{
GET_CURRENT_CONTEXT(ctx);
- fprintf(stderr, "%s\n", __FUNCTION__);
FALLBACK(ctx);
ctx->Save->CallLists( n, type, v );
}
@@ -1223,7 +1221,7 @@ static void _save_DrawElements(GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawElements" );
}
@@ -1233,38 +1231,38 @@ static void _save_DrawRangeElements(GLenum mode,
const GLvoid *indices)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawRangeElements" );
}
static void _save_DrawArrays(GLenum mode, GLint start, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawArrays" );
}
static void _save_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glRectf" );
}
static void _save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh1" );
}
static void _save_EvalMesh2( GLenum mode, GLint i1, GLint i2,
GLint j1, GLint j2 )
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
}
static void _save_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT( ctx );
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive begin" );
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive glBegin" );
}
diff --git a/src/mesa/tnl/t_save_playback.c b/src/mesa/tnl/t_save_playback.c
index e30735af068..4669e4b32c9 100644
--- a/src/mesa/tnl/t_save_playback.c
+++ b/src/mesa/tnl/t_save_playback.c
@@ -1,4 +1,3 @@
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -188,7 +187,8 @@ void _tnl_playback_vertex_list( GLcontext *ctx, void *data )
/* Degenerate case: list references current data and would
* require fixup. Take the easier option & loop it back.
*/
- _mesa_debug( 0, "%s: loopback dangling attr ref\n", __FUNCTION__);
+ _mesa_debug(ctx,
+ "tnl_playback_vertex_list: loopback dangling attr ref\n");
_tnl_loopback_vertex_list( ctx, data );
return;
}
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c
index 21ec1c9a7b2..d834a1407a2 100644
--- a/src/mesa/tnl/t_vtx_api.c
+++ b/src/mesa/tnl/t_vtx_api.c
@@ -495,7 +495,7 @@ do { \
static void enum_error( void )
{
GET_CURRENT_CONTEXT( ctx );
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib" );
}
static void _tnl_Vertex2f( GLfloat x, GLfloat y )
@@ -790,7 +790,7 @@ static void _tnl_Materialfv( GLenum face, GLenum pname,
break;
default:
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__);
+ _mesa_error( ctx, GL_INVALID_ENUM, "glMaterialfv" );
return;
}
@@ -818,7 +818,7 @@ static void _tnl_Materialfv( GLenum face, GLenum pname,
MAT( _TNL_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
break;
default:
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glMaterialfv" );
return;
}
}
@@ -990,7 +990,7 @@ static void _tnl_Begin( GLenum mode )
ctx->Driver.CurrentExecPrimitive = mode;
}
else
- _mesa_error( ctx, GL_INVALID_OPERATION, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin" );
}
@@ -1023,7 +1023,7 @@ static void _tnl_End( void )
}
else
- _mesa_error( ctx, GL_INVALID_OPERATION, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" );
}
diff --git a/src/mesa/tnl/t_vtx_exec.c b/src/mesa/tnl/t_vtx_exec.c
index 744d44ea60c..5215e1d6fb3 100644
--- a/src/mesa/tnl/t_vtx_exec.c
+++ b/src/mesa/tnl/t_vtx_exec.c
@@ -28,20 +28,21 @@
#include "glheader.h"
#include "api_eval.h"
#include "context.h"
+#include "enums.h"
#include "state.h"
#include "macros.h"
#include "math/m_eval.h"
#include "t_vtx_api.h"
#include "t_pipeline.h"
+
static void _tnl_print_vtx( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint count = tnl->vtx.initial_counter - tnl->vtx.counter;
GLuint i;
- _mesa_debug(0, "%s: %u vertices %d primitives, %d vertsize\n",
- __FUNCTION__,
+ _mesa_debug(ctx, "_tnl_print_vtx: %u vertices %d primitives, %d vertsize\n",
count,
tnl->vtx.prim_count,
tnl->vtx.vertex_size);
@@ -112,8 +113,8 @@ static void _tnl_vb_bind_vtx( GLcontext *ctx )
GLuint count = tnl->vtx.initial_counter - tnl->vtx.counter;
GLuint attr, i;
- if (0) fprintf(stderr, "%s: %d verts %d vertsize\n",
- __FUNCTION__, count, tnl->vtx.vertex_size);
+ if (0) fprintf(stderr, "_tnl_vb_bind_vtx(): %d verts %d vertsize\n",
+ count, tnl->vtx.vertex_size);
/* Setup constant data in the VB.
@@ -178,9 +179,6 @@ static void _tnl_vb_bind_vtx( GLcontext *ctx )
}
-
-
-
/*
* NOTE: Need to have calculated primitives by this point -- do it on the fly.
* NOTE: Old 'parity' issue is gone.
@@ -255,10 +253,6 @@ static GLuint _tnl_copy_vertices( GLcontext *ctx )
}
-
-
-
-
/**
* Execute the buffer and save copied verts.
*/
@@ -293,8 +287,3 @@ void _tnl_flush_vtx( GLcontext *ctx )
tnl->vtx.counter = tnl->vtx.initial_counter;
tnl->vtx.vbptr = tnl->vtx.buffer;
}
-
-
-
-
-