]> git.mdlowis.com Git - proto/labwc.git/commitdiff
drm_syncobj_v1
authorzeusgoose <193160247+zeusgoose@users.noreply.github.com>
Wed, 21 May 2025 23:19:39 +0000 (23:19 +0000)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 22 May 2025 10:04:42 +0000 (12:04 +0200)
ref: https://github.com/swaywm/sway/commit/05e895c4638293a6bfe594ff0cae4eaab63b740e

src/server.c

index ccbd57baf3db1fb7db0717d4adfabedb4bcbce45..4cfd015adbf52c9d83cbce8563b5d6680d00ad89 100644 (file)
@@ -13,6 +13,7 @@
 #include <wlr/types/wlr_foreign_toplevel_management_v1.h>
 #include <wlr/types/wlr_fractional_scale_v1.h>
 #include <wlr/types/wlr_gamma_control_v1.h>
+#include <wlr/types/wlr_linux_drm_syncobj_v1.h>
 #include <wlr/types/wlr_presentation_time.h>
 #include <wlr/types/wlr_primary_selection_v1.h>
 #include <wlr/types/wlr_screencopy_v1.h>
@@ -530,6 +531,12 @@ server_init(struct server *server)
                wlr_log(WLR_DEBUG, "unable to initialize dmabuf");
        }
 
+       if (wlr_renderer_get_drm_fd(server->renderer) >= 0 &&
+                       server->renderer->features.timeline) {
+               wlr_linux_drm_syncobj_manager_v1_create(server->wl_display, 1,
+                       wlr_renderer_get_drm_fd(server->renderer));
+       }
+
        /*
         * Autocreates an allocator for us. The allocator is the bridge between
         * the renderer and the backend. It handles the buffer creation,