#include "main/context.h"
+#include "main/debug_output.h"
#include "program/prog_print.h"
#include "pipe/p_state.h"
}
void
-st_enable_debug_output(struct st_context *st, boolean enable)
+st_update_debug_callback(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
if (!pipe->set_debug_callback)
return;
- if (enable) {
+ if (_mesa_get_debug_state_int(st->ctx, GL_DEBUG_OUTPUT)) {
struct pipe_debug_callback cb;
memset(&cb, 0, sizeof(cb));
+ cb.async = !_mesa_get_debug_state_int(st->ctx, GL_DEBUG_OUTPUT_SYNCHRONOUS);
cb.debug_message = st_debug_message;
cb.data = st;
pipe->set_debug_callback(pipe, &cb);
void st_debug_init( void );
-void st_enable_debug_output(struct st_context *st, boolean enable);
+void st_update_debug_callback(struct st_context *st);
static inline void
ST_DBG( unsigned flag, const char *fmt, ... )
st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
- st_enable_debug_output(st, TRUE);
+ st_update_debug_callback(st);
}
if (attribs->flags & ST_CONTEXT_FLAG_FORWARD_COMPATIBLE)