Consider using vulkan renderer in default configuration

With this change vulkan renderer can be automatically chosen in two more cases:

GLES2 renderer is disabled at compile time
GLES2 renderer failed to be created

Main purpose of this change is to automatically choose vulkan as renderer when GLES2 renderer is not enabled.
This commit is contained in:
mmcomando 2024-11-06 08:52:58 +01:00
parent 3fdbfb0be8
commit c5d8f6d187

View File

@ -241,7 +241,7 @@ static struct wlr_renderer *renderer_autocreate(struct wlr_backend *backend, int
}
}
if (strcmp(renderer_name, "vulkan") == 0) {
if ((is_auto && WLR_HAS_VULKAN_RENDERER) || strcmp(renderer_name, "vulkan") == 0) {
if (!open_preferred_drm_fd(backend, &drm_fd, &own_drm_fd)) {
log_creation_failure(is_auto, "Cannot create Vulkan renderer: no DRM FD available");
} else {