aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-09-09 18:59:49 -0400
committerKristian Høgsberg <[email protected]>2010-09-09 19:02:55 -0400
commit042a333028eba49f21b45cafaf9dd15d34c68033 (patch)
tree0827f533c2a7e53d0b80fe1261e5b1ca028fee5f /src/mesa
parent1f3c7d968c4313dbb71bc93306556cc9292d06ef (diff)
Revert "glapi: Implement optional dispatch logging"
This reverts commit b9abc6139a310677a37754ea7172d976dbf56979 and the follow on fixes (7aae704 and 6fe1b47). It's changing the glapi/driver ABI and causes a number of problems for debug/non-debug builds.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/dri_test.c12
-rw-r--r--src/mesa/main/context.c35
-rw-r--r--src/mesa/main/context.h3
-rw-r--r--src/mesa/main/debug.c6
-rw-r--r--src/mesa/main/dlist.c8
-rw-r--r--src/mesa/main/mtypes.h3
6 files changed, 8 insertions, 59 deletions
diff --git a/src/mesa/drivers/dri/common/dri_test.c b/src/mesa/drivers/dri/common/dri_test.c
index 8a47316bea6..793f0c37d79 100644
--- a/src/mesa/drivers/dri/common/dri_test.c
+++ b/src/mesa/drivers/dri/common/dri_test.c
@@ -82,18 +82,6 @@ _glthread_GetID(void)
return 0;
}
-PUBLIC int
-_glapi_logging_available(void)
-{
- return 0;
-}
-
-PUBLIC void
-_glapi_enable_logging(void (*func)(void *data, const char *fmt, ...),
- void *data)
-{
-}
-
int main(int argc, char** argv)
{
void* p = __driDriverExtensions;
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index decc1dd77da..979bc4019ba 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1370,38 +1370,7 @@ _mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height)
}
}
-#ifdef DEBUG
-
-static void
-dispatch_logger(void *data, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-}
-
-void
-_mesa_set_dispatch(void *table)
-{
- if (table && (MESA_VERBOSE & VERBOSE_DISPATCH)) {
- _glapi_set_dispatch(table);
- _glapi_enable_logging(dispatch_logger, stderr);
- } else {
- _glapi_set_dispatch(table);
- }
-}
-#else
-
-void
-_mesa_set_dispatch(void *table)
-{
- _glapi_set_dispatch(table);
-}
-
-#endif
/**
* Bind the given context to the given drawBuffer and readBuffer and
* make it the current context for the calling thread.
@@ -1445,10 +1414,10 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
ASSERT(_mesa_get_current_context() == newCtx);
if (!newCtx) {
- _mesa_set_dispatch(NULL); /* none current */
+ _glapi_set_dispatch(NULL); /* none current */
}
else {
- _mesa_set_dispatch(newCtx->CurrentDispatch);
+ _glapi_set_dispatch(newCtx->CurrentDispatch);
if (drawBuffer && readBuffer) {
/* TODO: check if newCtx and buffer's visual match??? */
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 142243f5ee3..c61da62826f 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -145,9 +145,6 @@ extern GLboolean
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );
-extern void
-_mesa_set_dispatch(void *table);
-
extern GLboolean
_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare);
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index e5c313304d1..526145aeccf 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -201,8 +201,7 @@ static void add_debug_flags( const char *debug )
{ "lighting", VERBOSE_LIGHTING },
{ "disassem", VERBOSE_DISASSEM },
{ "draw", VERBOSE_DRAW },
- { "swap", VERBOSE_SWAPBUFFERS },
- { "dispatch", VERBOSE_DISPATCH }
+ { "swap", VERBOSE_SWAPBUFFERS }
};
GLuint i;
@@ -212,9 +211,6 @@ static void add_debug_flags( const char *debug )
MESA_VERBOSE |= debug_opt[i].flag;
}
- if ((MESA_VERBOSE & VERBOSE_DISPATCH) && !_glapi_logging_available())
- _mesa_debug(NULL, "dispatch logging not available in this buidl\n");
-
/* Debug flag:
*/
if (strstr(debug, "flush"))
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 0c4e3d51a9d..6928d21a21e 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -8062,7 +8062,7 @@ _mesa_NewList(GLuint name, GLenum mode)
ctx->Driver.NewList(ctx, name, mode);
ctx->CurrentDispatch = ctx->Save;
- _mesa_set_dispatch(ctx->CurrentDispatch);
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
@@ -8109,7 +8109,7 @@ _mesa_EndList(void)
ctx->CompileFlag = GL_FALSE;
ctx->CurrentDispatch = ctx->Exec;
- _mesa_set_dispatch(ctx->CurrentDispatch);
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
@@ -8143,7 +8143,7 @@ _mesa_CallList(GLuint list)
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
ctx->CurrentDispatch = ctx->Save;
- _mesa_set_dispatch(ctx->CurrentDispatch);
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
}
@@ -8195,7 +8195,7 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
ctx->CurrentDispatch = ctx->Save;
- _mesa_set_dispatch(ctx->CurrentDispatch);
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index bcd324b4432..a1a0a23bd2c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3346,8 +3346,7 @@ enum _verbose
VERBOSE_VERTS = 0x0800,
VERBOSE_DISASSEM = 0x1000,
VERBOSE_DRAW = 0x2000,
- VERBOSE_SWAPBUFFERS = 0x4000,
- VERBOSE_DISPATCH = 0x8000
+ VERBOSE_SWAPBUFFERS = 0x4000
};