mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-13 05:34:13 -04:00
backend: add timeline feature flag
The output feature flag has a flaw: it's not possible to check whether the backend supports timelines during compositor initialization when we need to figure out whether we want to enable the linux-drm-syncobj-v1 protocol. Introduce a backend-wide feature flag to indicate support for timelines to address this defect. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3904
This commit is contained in:
parent
8d8d5f5e94
commit
514c4b4cce
4 changed files with 25 additions and 0 deletions
|
|
@ -126,6 +126,12 @@ bool check_drm_features(struct wlr_drm_backend *drm) {
|
|||
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
||||
}
|
||||
|
||||
drm->backend.features.timeline = drm->iface != &legacy_iface;
|
||||
if (drm->parent) {
|
||||
drm->backend.features.timeline = drm->backend.features.timeline &&
|
||||
drm->mgpu_renderer.wlr_rend->features.timeline;
|
||||
}
|
||||
|
||||
if (env_parse_bool("WLR_DRM_NO_MODIFIERS")) {
|
||||
wlr_log(WLR_DEBUG, "WLR_DRM_NO_MODIFIERS set, disabling modifiers");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue