aboutsummaryrefslogtreecommitdiff
path: root/render/egl.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-05-11 10:50:35 +0200
committerKenny Levinsen <kl@kl.wtf>2021-05-11 12:43:25 +0200
commit101b9a193d91c9bb4d6917dd2e97c010ea219f3b (patch)
treec94058268b53675b47a817d9bb27a28146afa15d /render/egl.c
parent8008d21f5b81c705bb14d168aeda508c975125c9 (diff)
render/egl: query and display EGL driver name
GL_RENDERER typically displays a human-readable string for the name of the GPU, and EGL_VENDOR typically displays a human-readable string for the GPU manufacturer. EGL_DRIVER_NAME_EXT should give the name of the driver in use. References: https://github.com/KhronosGroup/EGL-Registry/commit/e8baa0bf39120803505c6e360e1e33af0d9b9745
Diffstat (limited to 'render/egl.c')
-rw-r--r--render/egl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/render/egl.c b/render/egl.c
index e2551268..616b3c6b 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -251,7 +251,7 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
"eglQueryWaylandBufferWL");
}
- const char *device_exts_str = NULL;
+ const char *device_exts_str = NULL, *driver_name = NULL;
if (check_egl_ext(client_exts_str, "EGL_EXT_device_query")) {
load_egl_proc(&egl->procs.eglQueryDisplayAttribEXT,
"eglQueryDisplayAttribEXT");
@@ -285,6 +285,13 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
}
}
+#ifdef EGL_DRIVER_NAME_EXT
+ if (check_egl_ext(device_exts_str, "EGL_EXT_device_persistent_id")) {
+ driver_name = egl->procs.eglQueryDeviceStringEXT(egl->device,
+ EGL_DRIVER_NAME_EXT);
+ }
+#endif
+
egl->exts.device_drm_ext =
check_egl_ext(device_exts_str, "EGL_EXT_device_drm");
}
@@ -309,6 +316,9 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
wlr_log(WLR_INFO, "Supported EGL device extensions: %s", device_exts_str);
}
wlr_log(WLR_INFO, "EGL vendor: %s", eglQueryString(egl->display, EGL_VENDOR));
+ if (driver_name != NULL) {
+ wlr_log(WLR_INFO, "EGL driver name: %s", driver_name);
+ }
init_dmabuf_formats(egl);