diff options
author | Emil Velikov <[email protected]> | 2018-07-04 17:21:16 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-11-01 00:05:43 +0000 |
commit | dbb4457d9858fa977246aa5e9cabe83455022dfe (patch) | |
tree | c0deb5d3a61ee571fae056b2d960663a53b419a9 /src/egl/main/egldevice.h | |
parent | f73c5d27c1f0be9fc5280d508bac483ed54d9b29 (diff) |
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 <[email protected]>
Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/egl/main/egldevice.h')
-rw-r--r-- | src/egl/main/egldevice.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/main/egldevice.h b/src/egl/main/egldevice.h index 74b5ddeee5c..ddcdcd17f5a 100644 --- a/src/egl/main/egldevice.h +++ b/src/egl/main/egldevice.h @@ -60,6 +60,7 @@ _eglAddDevice(int fd, bool software); enum _egl_device_extension { _EGL_DEVICE_SOFTWARE, + _EGL_DEVICE_DRM, }; typedef enum _egl_device_extension _EGLDeviceExtension; @@ -67,6 +68,9 @@ typedef enum _egl_device_extension _EGLDeviceExtension; EGLBoolean _eglDeviceSupports(_EGLDevice *dev, _EGLDeviceExtension ext); +const char * +_eglGetDRMDeviceRenderNode(_EGLDevice *dev); + EGLBoolean _eglQueryDeviceAttribEXT(_EGLDevice *dev, EGLint attribute, EGLAttrib *value); |