aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/dri_test.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-09-09 12:59:14 -0400
committerKristian Høgsberg <[email protected]>2010-09-09 13:21:15 -0400
commitb9abc6139a310677a37754ea7172d976dbf56979 (patch)
treedd42377907938fe8a5e9eb3c24ec3df678a0fe25 /src/mesa/drivers/dri/common/dri_test.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/drivers/dri/common/dri_test.c')
-rw-r--r--src/mesa/drivers/dri/common/dri_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_test.c b/src/mesa/drivers/dri/common/dri_test.c
index 793f0c37d79..8a47316bea6 100644
--- a/src/mesa/drivers/dri/common/dri_test.c
+++ b/src/mesa/drivers/dri/common/dri_test.c
@@ -82,6 +82,18 @@ _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;