aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-11-25 15:58:22 +0000
committerBrian Paul <[email protected]>2003-11-25 15:58:22 +0000
commitb65bc4f87b356cf6228151cd2f341432e80dc6b8 (patch)
tree208918293c838bb8c86c59cb266b621def3ac2d7 /src/mesa/main
parente749be22b03312c3927964c85d589868e3292977 (diff)
Remove unnecessary usage of __FUNCTION__.
#define MESA_FUNCTION to __FUNCTION__ if MESA_DEBUG is defined.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_noop.c34
-rw-r--r--src/mesa/main/context.h4
-rw-r--r--src/mesa/main/mtypes.h2
3 files changed, 21 insertions, 19 deletions
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c
index f6228739dd7..e60720fff52 100644
--- a/src/mesa/main/api_noop.c
+++ b/src/mesa/main/api_noop.c
@@ -389,83 +389,83 @@ void _mesa_noop_TexCoord4fv( const GLfloat *v )
void _mesa_noop_VertexAttrib1fNV( GLuint index, GLfloat x )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], x, 0, 0, 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1f" );
}
void _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], v[0], 0, 0, 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fv" );
}
void _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2f" );
}
void _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], 0, 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fv" );
}
void _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x,
GLfloat y, GLfloat z )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3f" );
}
void _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], 1);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fv" );
}
void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x,
GLfloat y, GLfloat z, GLfloat w )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4f" );
}
void _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
- if (index < 16) {
+ if (index < VERT_ATTRIB_MAX) {
ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
}
else
- _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fv" );
}
/* Material
@@ -575,7 +575,7 @@ void _mesa_noop_Begin( GLenum mode )
void _mesa_noop_End( void )
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_error( ctx, GL_INVALID_OPERATION, __FUNCTION__ );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" );
}
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 663cfc84500..2687dc596a9 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -278,7 +278,7 @@ _mesa_Flush( void );
#define FLUSH_VERTICES(ctx, newstate) \
do { \
if (MESA_VERBOSE & VERBOSE_STATE) \
- _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", __FUNCTION__); \
+ _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\
if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \
ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \
ctx->NewState |= newstate; \
@@ -297,7 +297,7 @@ do { \
#define FLUSH_CURRENT(ctx, newstate) \
do { \
if (MESA_VERBOSE & VERBOSE_STATE) \
- _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", __FUNCTION__); \
+ _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \
if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \
ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \
ctx->NewState |= newstate; \
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 012667a2abe..d451cc8985e 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2263,9 +2263,11 @@ extern const char *_mesa_prim_name[GL_POLYGON+4];
#ifdef MESA_DEBUG
extern int MESA_VERBOSE;
extern int MESA_DEBUG_FLAGS;
+# define MESA_FUNCTION __FUNCTION__
#else
# define MESA_VERBOSE 0
# define MESA_DEBUG_FLAGS 0
+# define MESA_FUNCTION "a function"
# ifndef NDEBUG
# define NDEBUG
# endif