egl: add EGL_EXT_device_drm support
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 4 Jul 2018 16:21:16 +0000 (17:21 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 1 Nov 2018 00:05:43 +0000 (00:05 +0000)
commitdbb4457d9858fa977246aa5e9cabe83455022dfe
treec0deb5d3a61ee571fae056b2d960663a53b419a9
parentf73c5d27c1f0be9fc5280d508bac483ed54d9b29
egl: add EGL_EXT_device_drm support

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)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/egl/main/egldevice.c
src/egl/main/egldevice.h