[Mesa-dev] [PATCH] EGL: automatic API binding on eglMakeCurrent
Adrien Maglo
magsoft at videolan.org
Mon Jun 6 08:53:07 UTC 2016
Hello,
For some OpenGL visualization module inside VLC media player, we create the OpenGL context in one initialization thread and render in an other one.
I discovered that with Mesa EGL, eglMakeCurrent did not let me draw inside the rendering thread. Even if eglMakeCurrent returns EGL_SUCCESS, the later call to eglSwapBuffer fails by returning BAD_SURFACE.
Digging into Mesa EGL implementation, I saw that if the rendering thread does not bind an API, it's CurrentAPIIndex variable is never set and the context is not correctly linked.
I tested with NVidia implementation of EGL on Linux and did not encounter the same issue.
I wrote the following patch to change this behaviour but I am not sure it is right.
Thank you in advance for your comments.
--
Adrien Maglo
Adrien Maglo (1):
EGL: automatic API binding on eglMakeCurrent
src/egl/main/eglcontext.c | 1 +
1 file changed, 1 insertion(+)
--
2.7.4
More information about the mesa-dev
mailing list