backend/drm: fix timeline feature flag on multi-GPU setups

This piece of code checks for multi-GPU renderer support, so it
needs to run after the renderer is initialized.

Fixes: 514c4b4cce ("backend: add timeline feature flag")
Closes: https://github.com/swaywm/sway/issues/8382
This commit is contained in:
Simon Ser 2024-10-12 17:11:32 +02:00
parent 402a862413
commit 3b3ed21e61
2 changed files with 6 additions and 6 deletions

View file

@ -264,6 +264,12 @@ struct wlr_backend *wlr_drm_backend_create(struct wlr_session *session,
}
}
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;
}
drm->session_destroy.notify = handle_session_destroy;
wl_signal_add(&session->events.destroy, &drm->session_destroy);