mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render/egl: fail to create wlr_egl on software renderer
The creation of `wlr_egl` will fail is the device extension EGL_MESA_device_software is defined. The creation process is allowed to continue only if the environment variable `WLR_RENDERER_ALLOW_SOFTWARE` is defined to the value 1.
This commit is contained in:
parent
5a2ef794dc
commit
6becc69ec9
2 changed files with 17 additions and 0 deletions
12
render/egl.c
12
render/egl.c
|
|
@ -272,6 +272,18 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (check_egl_ext(device_exts_str, "EGL_MESA_device_software")) {
|
||||
const char *allow_software = getenv("WLR_RENDERER_ALLOW_SOFTWARE");
|
||||
if (strcmp(allow_software, "1") == 0) {
|
||||
wlr_log(WLR_INFO, "Using software rendering");
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "Software rendering detected, please use "
|
||||
"the WLR_RENDERER_ALLOW_SOFTWARE environment variable "
|
||||
"to proceed");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
egl->exts.device_drm_ext =
|
||||
check_egl_ext(device_exts_str, "EGL_EXT_device_drm");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue