egl: add EGL_EXT_device_drm support

Graphics / Mesa 3D Graphics Library / Mesa - Emil Velikov [collabora.com] - 1 November 2018 00:05 EDT

Add implementation based around the drmDevice API. As such it's only available only when building with libdrm. With the latter already a requirement when using !SW code paths in the platform code.

Note: the current code will work if a device is hot-plugged. Yet hot-unplugged is not implemented, since I have no ways of testing it.

v2:- ddd some _eglDeviceSupports checks- require DRM_NODE_RENDER- add _eglGetDRMDeviceRenderNode helper

v3:- flip inverted asserts (Mathias)

dbb4457d98 egl: add EGL_EXT_device_drm support
src/egl/main/egldevice.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++
src/egl/main/egldevice.h | 4 ++
2 files changed, 117 insertions(+)

Upstream: cgit.freedesktop.org


  • Share