gallium: expose a debug message callback settable by context owner
[mesa.git] / src / gallium / auxiliary / util / u_debug.c
index 7388a499c741192ee138159227a014c3fe539f68..702953673bac56799f987546c253265d6837f5ec 100644 (file)
@@ -70,6 +70,20 @@ void _debug_vprintf(const char *format, va_list ap)
 #endif
 }
 
+void
+_pipe_debug_message(
+   struct pipe_debug_callback *cb,
+   unsigned *id,
+   enum pipe_debug_type type,
+   const char *fmt, ...)
+{
+   va_list args;
+   va_start(args, fmt);
+   if (cb && cb->debug_message)
+      cb->debug_message(cb->data, id, type, fmt, args);
+   va_end(args);
+}
+
 
 void
 debug_disable_error_message_boxes(void)