xwayland: treat implicit sync as unsupported on gamenative-drm

Merged
UT
9d ago
+19-0

Problem

Xwayland assumes implicit sync for every non-NVIDIA EGL vendor (xwl_gbm->implicit_sync = !strstr(egl_vendor, "NVIDIA")) and therefore never finishes its GPU work before presenting a window buffer. On gamenative-drm there is no implicit sync: glamor runs on zink over Turnip/KGSL, the window buffers come from the daemon's pool with no dma-buf fences, and explicit sync is unavailable. The buffer is committed while glamor's upload of the client's frame is still running, and the panel scans it half-written.

Visible as a straight horizontal cut (new frame above, previous frame below) in GL games that present through Mesa's xlib path, e.g. SteamWorld Dig 2.

Change

When GAMENATIVE_DRM_SOCKET is set (the existing gamenative-drm detection), treat implicit sync as unsupported, so xwl_window_handle_pixmap_sync runs glamor_finish() before each commit, the same path Xwayland already uses for NVIDIA. XWAYLAND_GN_NO_IMPLICIT_SYNC=0 restores the old behaviour, =1 forces it on any device. One log line at start.

Measured (Retroid Pocket 6, SteamWorld Dig 2 under gamescope, scripted map toggles, 25 s recordings)

Xwaylandflagged tears
shipped 24.1.1423
this change0 (two recordings, 1521 and 920 frames)

Frame rate unchanged at the 60 cap; Xwayland CPU +~5 %.