summaryrefslogtreecommitdiff
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.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 291485dc20..503bb44abd 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -119,9 +119,9 @@ typedef pthread_mutex_t _glthread_Mutex;
extern struct _glapi_table * _glapi_DispatchTSD;
extern _glthread_TSD _gl_DispatchTSD;
-#define GL_CALL(name) \
- (((__builtin_expect( _glapi_DispatchTSD != NULL, 1 )) \
- ? _glapi_DispatchTSD : (struct _glapi_table *) pthread_getspecific(_gl_DispatchTSD.key))-> name)
+#define GET_DISPATCH() \
+ ((__builtin_expect( _glapi_DispatchTSD != NULL, 1 )) \
+ ? _glapi_DispatchTSD : (struct _glapi_table *) pthread_getspecific(_gl_DispatchTSD.key))
#endif
#endif /* PTHREADS */
@@ -312,16 +312,16 @@ _glthread_SetTSD(_glthread_TSD *, void *);
extern __thread struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
-# define GL_CALL(name) (*(_glapi_tls_Dispatch-> name))
+#define GET_DISPATCH() _glapi_tls_Dispatch
#elif !defined(GL_CALL)
# if defined(THREADS)
extern struct _glapi_table * _glapi_DispatchTSD;
-# define GL_CALL(name) \
- (((__builtin_expect( _glapi_DispatchTSD != NULL, 1 )) \
- ? _glapi_DispatchTSD : _glapi_get_dispatch())-> name)
+# define GET_DISPATCH() \
+ ((__builtin_expect( _glapi_DispatchTSD != NULL, 1 )) \
+ ? _glapi_DispatchTSD : _glapi_get_dispatch())
# else
-# define GL_CALL(name) (*(_glapi_Dispatch-> name))
+# define GET_DISPATCH() _glapi_Dispatch
# endif /* defined(THREADS) */
#endif /* ndef GL_CALL */