[Mesa-dev] EGL: automatic API binding on eglMakeCurrent

Submitted by Adrien Maglo on June 6, 2016, 8:53 a.m.

Details

Message ID 1465203188-28575-2-git-send-email-magsoft@videolan.org
State New
Headers show
Series "EGL: automatic API binding on eglMakeCurrent" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Adrien Maglo June 6, 2016, 8:53 a.m.
A first thread binds an API and creates a context. If a second thread calls
eglMakeCurrent with the same context as parameter without having bound the
same API, the context is not linked correctly as the CurrentAPIIndex
variable as never been set.
---
 src/egl/main/eglcontext.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index ae19862..cd75c03 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -570,6 +570,7 @@  _eglBindContextToThread(_EGLContext *ctx, _EGLThreadInfo *t)
       if (ctx)
          ctx->Binding = t;
 
+      t->CurrentAPIIndex = apiIndex;
       t->CurrentContexts[apiIndex] = ctx;
    }