You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2018-06-14 06:12:12 +0000, Tomeu Vizoso wrote:
Created attachment 3261
fix
SDL_EGL_DeleteContext calls SDL_EGL_MakeCurrent(_this, NULL, NULL); right before calling eglDestroyContext.
If the context to be destroyed isn't the current one, any context tracking that the app is doing will be broken.
If the context to be destroyed is the current one, SDL_GL_DeleteContext will have unset it already.
This patch brings the behavior of the EGL backend in line with the one in the GLX one.
On 2018-06-15 03:36:22 +0000, Sam Lantinga wrote:
The context needs to no longer be current:
If the EGL rendering context context is not current to any thread, eglDestroyContext destroys it immediately. Otherwise, context is destroyed when it becomes not current to any thread.
The GLX code does the same thing:
_this->gl_data->glXMakeCurrent(display, None, NULL);
_this->gl_data->glXDestroyContext(display, context);
If there's a way to tell whether the context is current, that would be the right thing to do.
On 2018-06-15 04:53:16 +0000, Tomeu Vizoso wrote:
(In reply to Sam Lantinga from comment # 1)
The context needs to no longer be current:
If the EGL rendering context context is not current to any thread,
eglDestroyContext destroys it immediately. Otherwise, context is destroyed
when it becomes not current to any thread.
The GLX code does the same thing:
_this->gl_data->glXMakeCurrent(display, None, NULL);
_this->gl_data->glXDestroyContext(display, context);
I see that in X11_GL_InitExtensions, but not in X11_GL_DeleteContext.
If there's a way to tell whether the context is current, that would be the
right thing to do.
SDL_GL_DeleteContext already takes care of that:
if (SDL_GL_GetCurrentContext() == context) {
SDL_GL_MakeCurrent(NULL, NULL);
}
_this->GL_DeleteContext(_this, context);
On 2018-06-25 05:48:39 +0000, Ryan C. Gordon wrote:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2018-06-14 06:12:12 +0000, Tomeu Vizoso wrote:
On 2018-06-15 03:36:22 +0000, Sam Lantinga wrote:
On 2018-06-15 04:53:16 +0000, Tomeu Vizoso wrote:
On 2018-06-25 05:48:39 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: