Xwayland delays Present frame submissions
I'm trying to fix the following issue:
- An X11 Vulkan client uses a
- The Vulkan WSI sends a
PresentPixmaprequest with a zero
- Xwayland receives the request (in
present_wnmd_pixmap), but doesn't forward it to the parent Wayland compositor. Instead, it waits for a
- When the
wl_surface.framecallback is done, Xwayland attaches the new buffer and commits the surface.
Here is a visualization of the Xwayland events. The pink vertical lines are vblanks.
This behavior is an issue because it introduces a whole vblank worth of latency. The X11 client just wants to display a frame at the next vblank, but because Xwayland waits for wl_surface.frame`, it ends up being displayed two vblanks later.
Couldn't Xwayland submit the frame as soon as the client issues the
This would require some changes in the
present_wnmd code, but it seems doable.