You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracks the follow-up increments for the experimental zero-copy dma-buf present path landed in #316 (behind IVI_VK_DMABUF, default off). #316 is the direct-present increment: it renders continuously and correctly on mutter and tinywl (AMD RADV), but has known gaps captured here.
1. Refresh-adaptive pacing (highest priority)
Symptom: on mutter the rasterizer runs free (~1140 fps) instead of pacing to the panel refresh. On tinywl (no wp_presentation) the engine's wall-clock scheduler paces correctly at 59 fps, which localizes the problem to the feedback-driven vsync path, not the present ring.
Root cause: the swapchain path gets backpressure from vkQueuePresentKHR blocking at vblank under FIFO, so the engine commits at ~refresh → ~60 wp_presentation_feedback answers/s → the vsync provider delivers one baton per answer → ~60 fps. The dma-buf path's commit is non-blocking, so the engine commits as fast as it renders; the compositor answers every feedback (presented and discarded), the provider delivers a baton per answer, and the engine runs away.
Fix options (need design):
Add Wayland-idiomatic backpressure: a wl_surface.frame callback the producer waits on before the next commit (bounds commits to refresh). Requires coordinating the raster thread with the Display event thread that dispatches the callback.
Or rate-limit baton delivery in WaylandVsyncProvider to the reported refresh (AdaptPacingToRefresh, as in the skia-skottie-canvas example) — but that path is shared with the swapchain backend, so it needs care.
Once paced, the wl_buffer.release gating added in #316 becomes a rare safety rather than the primary guard.
2. Explicit sync (wp_linux_drm_syncobj_v1)
#316 uses a per-slot CPU fence (block until the blit completes before commit). Replace with explicit GPU sync: export a sync_file from a signaled VkSemaphore (vkGetSemaphoreFdKHR, already done in drm_kms_vulkan) into a drm_syncobj acquire point the compositor waits on, and poll the release point before reusing a slot. Blocked on a wayland-cxx-scanner bump — wp_linux_drm_syncobj isn't vendored yet.
3. Platform-view compositing on the dma-buf path
PresentLayersDmabuf composites only the backing-store layers today; kFlutterLayerContentTypePlatformView layers are skipped (the swapchain path handles them via wl_subsurface/ICompositorSurface).
Tracks the follow-up increments for the experimental zero-copy dma-buf present path landed in #316 (behind
IVI_VK_DMABUF, default off). #316 is the direct-present increment: it renders continuously and correctly on mutter and tinywl (AMD RADV), but has known gaps captured here.1. Refresh-adaptive pacing (highest priority)
Symptom: on mutter the rasterizer runs free (~1140 fps) instead of pacing to the panel refresh. On tinywl (no
wp_presentation) the engine's wall-clock scheduler paces correctly at 59 fps, which localizes the problem to the feedback-driven vsync path, not the present ring.Root cause: the swapchain path gets backpressure from
vkQueuePresentKHRblocking at vblank under FIFO, so the engine commits at ~refresh → ~60wp_presentation_feedbackanswers/s → the vsync provider delivers one baton per answer → ~60 fps. The dma-buf path's commit is non-blocking, so the engine commits as fast as it renders; the compositor answers every feedback (presented and discarded), the provider delivers a baton per answer, and the engine runs away.Fix options (need design):
wl_surface.framecallback the producer waits on before the next commit (bounds commits to refresh). Requires coordinating the raster thread with the Display event thread that dispatches the callback.WaylandVsyncProviderto the reported refresh (AdaptPacingToRefresh, as in the skia-skottie-canvas example) — but that path is shared with the swapchain backend, so it needs care.Once paced, the
wl_buffer.releasegating added in #316 becomes a rare safety rather than the primary guard.2. Explicit sync (
wp_linux_drm_syncobj_v1)#316 uses a per-slot CPU fence (block until the blit completes before commit). Replace with explicit GPU sync: export a
sync_filefrom a signaledVkSemaphore(vkGetSemaphoreFdKHR, already done indrm_kms_vulkan) into adrm_syncobjacquire point the compositor waits on, and poll the release point before reusing a slot. Blocked on a wayland-cxx-scanner bump —wp_linux_drm_syncobjisn't vendored yet.3. Platform-view compositing on the dma-buf path
PresentLayersDmabufcomposites only the backing-store layers today;kFlutterLayerContentTypePlatformViewlayers are skipped (the swapchain path handles them viawl_subsurface/ICompositorSurface).4. Validation
SURFACE_LOST.