diff options
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/main/eglapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index d0f9749f84..7e77ef1f03 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -997,6 +997,7 @@ eglReleaseThread(void) /* unbind current contexts */ if (!_eglIsCurrentThreadDummy()) { _EGLThreadInfo *t = _eglGetCurrentThread(); + EGLint api_index = t->CurrentAPIIndex; EGLint i; for (i = 0; i < _EGL_API_NUM_APIS; i++) { @@ -1004,9 +1005,12 @@ eglReleaseThread(void) if (ctx) { _EGLDisplay *disp = ctx->Resource.Display; _EGLDriver *drv = disp->Driver; + t->CurrentAPIIndex = i; (void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL); } } + + t->CurrentAPIIndex = api_index; } _eglDestroyCurrentThread(); |