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: e8baa0bf39
This commit is contained in:
parent
8008d21f5b
commit
101b9a193d
12
render/egl.c
12
render/egl.c
|
@ -251,7 +251,7 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
|
||||||
"eglQueryWaylandBufferWL");
|
"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")) {
|
if (check_egl_ext(client_exts_str, "EGL_EXT_device_query")) {
|
||||||
load_egl_proc(&egl->procs.eglQueryDisplayAttribEXT,
|
load_egl_proc(&egl->procs.eglQueryDisplayAttribEXT,
|
||||||
"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 =
|
egl->exts.device_drm_ext =
|
||||||
check_egl_ext(device_exts_str, "EGL_EXT_device_drm");
|
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, "Supported EGL device extensions: %s", device_exts_str);
|
||||||
}
|
}
|
||||||
wlr_log(WLR_INFO, "EGL vendor: %s", eglQueryString(egl->display, EGL_VENDOR));
|
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);
|
init_dmabuf_formats(egl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue