[PATCH weston] gl-renderer: Fix an invalid write when closing a Weston window

Daniel Stone daniel at fooishbar.org
Thu Nov 24 11:51:51 UTC 2016


Hi Dima,

On 24 November 2016 at 02:41, Dima Ryazanov <dima at gmail.com> wrote:
> Call eglMakeCurrent before destroying the native EGL window, similar to what
> other sample clients are already doing.

This doesn't show as an error here, with your suggested reproduction
instructions. From eglDestroySurface:
'If the EGL surface surface is not current to any thread,
eglDestroySurface destroys it immediately. Otherwise, surface is
destroyed when it becomes not current to any thread.'

Which GL stack are you using? The comment above the no-surface
MakeCurrent in gl_renderer_destroy() is probably pretty telling, that
Mesa once had a bug.

Regardless of this, I am inclined to apply it to match the others,
even just so we can be sure that the destroy takes effect immediately.

Cheers,
Daniel


More information about the wayland-devel mailing list