aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-01-17 00:09:04 -0500
committerSimon Ser <contact@emersion.fr>2021-01-20 15:29:00 +0100
commitee31be167b4e2c4682f3da6f22bddc23796f213d (patch)
treed167475d7d85f3e302d911be176da64c31f89a18 /include/wlr/render
parent62f37ee319804b53b434a84ae2849bf30f9cc089 (diff)
render: add wlr_egl_create_from_drm_fd function
Diffstat (limited to 'include/wlr/render')
-rw-r--r--include/wlr/render/egl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 82aa9505..3facd87d 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -53,6 +53,9 @@ struct wlr_egl {
// Device extensions
bool device_drm_ext;
+
+ // Client extensions
+ bool device_query_ext;
} exts;
struct {
@@ -70,6 +73,7 @@ struct wlr_egl {
PFNEGLDEBUGMESSAGECONTROLKHRPROC eglDebugMessageControlKHR;
PFNEGLQUERYDISPLAYATTRIBEXTPROC eglQueryDisplayAttribEXT;
PFNEGLQUERYDEVICESTRINGEXTPROC eglQueryDeviceStringEXT;
+ PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
} procs;
struct wl_display *wl_display;
@@ -88,6 +92,15 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
const EGLint *config_attribs);
/**
+ * Creates and EGL context from a given drm fd. This function uses the
+ * following extensions:
+ * - EXT_device_enumeration to get the list of available EGLDeviceEXT
+ * - EXT_device_drm to get the name of the EGLDeviceEXT
+ * - EXT_platform_device to create an EGLDisplay from an EGLDeviceEXT
+ */
+struct wlr_egl *wlr_egl_create_from_drm_fd(int drm_fd);
+
+/**
* Frees all related EGL resources, makes the context not-current and
* unbinds a bound wayland display.
*/