summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_debug.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-10-30 03:17:35 -0400
committerIlia Mirkin <[email protected]>2015-11-05 11:22:18 -0500
commitfc76cc05e39839c0933320f28b4cc9041d4e7770 (patch)
tree7faf5d73ad217de8635396ce8fbed4429c638abf /src/gallium/auxiliary/util/u_debug.c
parente587590a83588133d7a9044e3935585f675bbb30 (diff)
gallium: expose a debug message callback settable by context owner
This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug.c')
-rw-r--r--src/gallium/auxiliary/util/u_debug.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 7388a499c74..702953673ba 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -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)