summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/glthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/glapi/glthread.h')
-rw-r--r--src/mesa/glapi/glthread.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 1d2a4a7b003..615d169986d 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -306,7 +306,14 @@ _glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
-#ifndef GL_CALL
+#if defined(GLX_USE_TLS)
+
+extern __thread struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")));
+
+# define GL_CALL(name) (*(_glapi_tls_Dispatch-> name))
+
+#elif !defined(GL_CALL)
# if defined(THREADS)
extern struct _glapi_table * _glapi_DispatchTSD;
# define GL_CALL(name) \