render/egl: initialize wlr_egl with EGL_PLATFORM_DEVICE_EXT

Uses the EXT_device_query extension to get the EGL device matching the
requested DRM file descriptor. If the extension is not supported or no device
is found, the EGL device will be retrieved using GBM.

Depends on the EGL_EXT_device_enumeration to get the list of EGL devices.
This commit is contained in:
Simon Zeni 2021-01-20 21:14:04 -05:00 committed by Simon Ser
parent 7667ab73bd
commit 6f19295647
2 changed files with 146 additions and 35 deletions

View file

@ -44,6 +44,11 @@ struct wlr_egl {
// Device extensions
bool EXT_device_drm;
bool EXT_device_drm_render_node;
// Client extensions
bool EXT_device_query;
bool KHR_platform_gbm;
bool EXT_platform_device;
} exts;
struct {
@ -56,6 +61,7 @@ struct wlr_egl {
PFNEGLDEBUGMESSAGECONTROLKHRPROC eglDebugMessageControlKHR;
PFNEGLQUERYDISPLAYATTRIBEXTPROC eglQueryDisplayAttribEXT;
PFNEGLQUERYDEVICESTRINGEXTPROC eglQueryDeviceStringEXT;
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
} procs;
struct wlr_drm_format_set dmabuf_texture_formats;