summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/glapi/glapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 30aec209e7..b9ab9c07be 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -240,6 +240,10 @@ _glapi_check_multithread(void)
_glthread_LOCK_MUTEX(ThreadCheckMutex);
if (firstCall) {
+ /* initialize TSDs */
+ (void) _glthread_GetTSD(&ContextTSD);
+ (void) _glthread_GetTSD(&_gl_DispatchTSD);
+
knownID = _glthread_GetID();
firstCall = GL_FALSE;
}