summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glapi.h
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-08-25 02:36:13 +0300
committerPauli Nieminen <suokkos@gmail.com>2009-08-25 02:36:13 +0300
commitce7ed63f0c2f5cb1c030f73a5d8f6544eaac0f81 (patch)
tree7554a2723fabb39037101724e5f179b70bb5a948 /src/mesa/glapi/glapi.h
parent4297f32c246cc5b726d02745456c06952322958d (diff)
parent1d5a06a1f7812c055db1d724e40d21a0e3686dd1 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
Diffstat (limited to 'src/mesa/glapi/glapi.h')
-rw-r--r--src/mesa/glapi/glapi.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/glapi/glapi.h b/src/mesa/glapi/glapi.h
index 8f2cf66218..b2a1fe6ee9 100644
--- a/src/mesa/glapi/glapi.h
+++ b/src/mesa/glapi/glapi.h
@@ -94,7 +94,10 @@ extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
# ifdef THREADS
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
+/* this variable is here only for quick access to current context/dispatch */
+extern GLboolean _glapi_SingleThreaded;
+# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) \
+ ((_glapi_SingleThreaded) ? _glapi_Context : _glapi_get_context())
# else
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
# endif