seat-streamer: fix GPU-snapshot crash + ghost; CQP rate control #1

Merged
gabrielgad merged 2 commits from gpu-snapshot into main 2026-06-18 18:00:00 -04:00
gabrielgad commented 2026-06-18 17:58:30 -04:00 (Migrated from github.com)

Fixes the vulkan-zerocopy GPU-snapshot path end to end on RADV (RX 9070 / GFX1201):

  • Crash: snap_copy ran vkCmdCopyImage on the video-encode queue (family 3, VIDEO_ENCODE-only — no TRANSFER), faulting inside RADV on the first frame (misreported by gst's process-wide segtrap as an srtp plugin crash). Now runs on a graphics/transfer queue; snap images are CONCURRENT across the graphics+encode families.
  • Ghost: import gamescope's dmabuf write-fence (EXPORT_SYNC_FILE) as a binary semaphore the copy waits on → snapshot always reads a finished frame. Kills the torn/stale-source ghosting and bitrate overspend.
  • Bitrate: RADV's vbr/cbr ignore the target (~54 Mbps firehose); switch to CQP (env-tunable via GSE_CQP_QP_I/QP_P, default 28/30).

Result on Patch Quest: full 200fps, idle ~3 Mbps, motion ~18-25, ghost-free (was 50-91 Mbps + ghosting).

Fixes the vulkan-zerocopy GPU-snapshot path end to end on RADV (RX 9070 / GFX1201): - **Crash:** `snap_copy` ran `vkCmdCopyImage` on the video-encode queue (family 3, VIDEO_ENCODE-only — no TRANSFER), faulting inside RADV on the first frame (misreported by gst's process-wide segtrap as an srtp plugin crash). Now runs on a graphics/transfer queue; snap images are CONCURRENT across the graphics+encode families. - **Ghost:** import gamescope's dmabuf write-fence (EXPORT_SYNC_FILE) as a binary semaphore the copy waits on → snapshot always reads a finished frame. Kills the torn/stale-source ghosting and bitrate overspend. - **Bitrate:** RADV's vbr/cbr ignore the target (~54 Mbps firehose); switch to CQP (env-tunable via GSE_CQP_QP_I/QP_P, default 28/30). Result on Patch Quest: full 200fps, idle ~3 Mbps, motion ~18-25, ghost-free (was 50-91 Mbps + ghosting).
Sign in to join this conversation.
No description provided.