summaryrefslogtreecommitdiff
path: root/src/mesa/main/debug.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-09-09 12:59:14 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-09-09 13:21:15 -0400
commitb9abc6139a310677a37754ea7172d976dbf56979 (patch)
treedd42377907938fe8a5e9eb3c24ec3df678a0fe25 /src/mesa/main/debug.c
parent94118fe2d4b1e5d0b9f39d9d2c44706db462e97e (diff)
glapi: Implement optional dispatch logging
There's a useful feature buried in glapi to log all API calls to stderr. Unfortunately it requires editing the code and then it's enabled unconditionally for that build. This patch builds in API logging for debug builds and makes it run-time switchable by setting MESA_DEBUG=dispatch.
Diffstat (limited to 'src/mesa/main/debug.c')
-rw-r--r--src/mesa/main/debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 526145aecc..e5c313304d 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -201,7 +201,8 @@ static void add_debug_flags( const char *debug )
{ "lighting", VERBOSE_LIGHTING },
{ "disassem", VERBOSE_DISASSEM },
{ "draw", VERBOSE_DRAW },
- { "swap", VERBOSE_SWAPBUFFERS }
+ { "swap", VERBOSE_SWAPBUFFERS },
+ { "dispatch", VERBOSE_DISPATCH }
};
GLuint i;
@@ -211,6 +212,9 @@ 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"))