From 2123bfcc9c8b375ba46bb59d493ddeac1b7291a6 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Mon, 4 Jan 2016 17:31:05 -0500 Subject: st/mesa: make KHR_debug output independent of context creation flags (v2) Instead, keep track of GL_DEBUG_OUTPUT and (un)install the pipe_debug_callback accordingly. Hardware drivers can still use the absence of the callback to skip more expensive operations in the normal case, and users can no longer be surprised by the need to set the debug flag at context creation time. v2: - re-add the proper initialization of debug contexts (Ilia Mirkin) - silence a potential warning (Ilia Mirkin) Reviewed-by: Ilia Mirkin --- src/mesa/state_tracker/st_debug.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker/st_debug.h') diff --git a/src/mesa/state_tracker/st_debug.h b/src/mesa/state_tracker/st_debug.h index 288eccf9f9c..ed3ead82914 100644 --- a/src/mesa/state_tracker/st_debug.h +++ b/src/mesa/state_tracker/st_debug.h @@ -32,6 +32,8 @@ #include "pipe/p_compiler.h" #include "util/u_debug.h" +struct st_context; + extern void st_print_current(void); @@ -59,6 +61,8 @@ extern int ST_DEBUG; void st_debug_init( void ); +void st_enable_debug_output(struct st_context *st, boolean enable); + static inline void ST_DBG( unsigned flag, const char *fmt, ... ) { -- cgit v1.2.3