From: Dongwon Kim Date: Wed, 28 Sep 2022 21:58:05 +0000 (-0700) Subject: ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch X-Git-Tag: v7.2.0-rc0~51^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=604a86895feb6639417fe957dfc95191f7f63565;p=thirdparty%2Fqemu.git ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch A thread often fails to bind an egl context to itself after guest VM is rebooted because the context is still owned by another thread. It is not very clear what condition makes this happen but this can be prevented by unbinding the context from the thread in the end of gd_egl_switch. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim Message-Id: <20220928215805.4661-1-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann --- diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index b5bffbab252..35f917ceb15 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -195,6 +195,9 @@ void gd_egl_switch(DisplayChangeListener *dcl, if (resized) { gd_update_windowsize(vc); } + + eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT); } QEMUGLContext gd_egl_create_context(DisplayGLCtx *dgc,