mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
egl: Correctly unbind contexts in eglReleaseThread.
MakeCurrent unbinds the current context of the current API. Modify the current API to make sure all contexts are correctly unbound.
This commit is contained in:
parent
17330479b3
commit
45ba533243
1 changed files with 4 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue