diff --git a/src/mapi/u_current.c b/src/mapi/u_current.c index 1402cea45d5..5dac7a5dde8 100644 --- a/src/mapi/u_current.c +++ b/src/mapi/u_current.c @@ -243,12 +243,15 @@ u_current_set_context(const void *ptr) * The context pointer is an opaque type which should be cast from * void to the real context pointer type. */ +#include "stdio.h" void * u_current_get_context_internal(void) { #if defined(GLX_USE_TLS) + fprintf (stderr, "%s tls u_current_context: %p \n", __func__, u_current_context); return u_current_context; #else + fprintf (stderr, "%s nottls ThreadSafe: %d u_current_context: %p \n", __func__, ThreadSafe, ThreadSafe ? tss_get(u_current_context_tsd) : u_current_context); return ThreadSafe ? tss_get(u_current_context_tsd) : u_current_context; #endif } diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c3d4784e94c..de5b5fe9126 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -1228,7 +1228,10 @@ intelDestroyContext(__DRIcontext * driContextPriv) GLboolean intelUnbindContext(__DRIcontext * driContextPriv) { - GET_CURRENT_CONTEXT(ctx); + //GET_CURRENT_CONTEXT(ctx); + struct gl_context *ctx = (struct gl_context *) (likely(_glapi_Context) + ? _glapi_Context : _glapi_get_context()); + fprintf (stderr, "%s _glapi_Context: %p \n", __func__, _glapi_Context); _mesa_glthread_finish(ctx); /* Unset current context and dispath table */