Skip to content

renderer/native: add missing eglTerminate in EGLDevice error path

Emil Velikov requested to merge (removed):egl-device-fixes into master

Currently the EGLDevice code gets the display and calls eglInitialize. As a follow-up it checks the required EGL extensions - technically it could check the EGL device extensions earlier.

In either case, eglTerminate is missing. Thus the connection to the display was still bound.

This was highlighted with Mesa commit d6edccee8da ("egl: add EGL_platform_device support") + amdgpu.

In that case, since the eglTerminate is missing, we end up reusing the underlying amdgpu_device due to some caching in libdrm_amdgpu. The latter in itself being a good solution since it allows buffer sharing across primary and render node of the same device.

Note: we should really get this in branches all the way back to 3.30.

Fixes: 934184e2 ("MetaRendererNative: Add EGLDevice based rendering support") Cc: Jonas Ådahl jadahl@gmail.com Signed-off-by: Emil Velikov emil.velikov@collabora.com

Adding some familiar names to the list ;-)

@jadahl @ofourdan @ppaalanen

Merge request reports