2 Commits
Author SHA1 Message Date
lbgos 43c9507755 Settings preview: track requested swapchain size; test process lookup
Compare layout changes against the size the swapchain was requested
for, not the extent the surface caps may clamp it to, so a clamped
surface cannot recreate the swapchain every frame. Add a focused test
for the /proc process lookup that replaced pgrep.
2026-10-13 20:08:19 +03:00
lbgos 5526967a23 Settings preview: zero-copy GPU path at headset refresh rate
The headset view is drawn natively instead of streamed through the
webview. A preview thread re-acquires SteamVR's system.HeadsetView
overlay once per compositor vsync with the same VROverlayView_t (as
the OpenVR header advises), samples it on SteamVR's GPU and presents
into a Vulkan swapchain on a Wayland subsurface placed over the
preview box. No readback, encode, IPC or decode.

- Re-acquire without release: ~25 us, no vrclient log line per frame
  (acquire+release cost ~1 ms and logged one line each time).
- Paced from IVRSystem::GetTimeSinceLastVsync, one present per
  compositor frame, MAILBOX/IMMEDIATE so the thread never blocks.
- In HMD Standby with no new compositor frame, refresh once a second:
  any display-rate GPU submit costs vrcompositor CPU on NVIDIA.
- The subsurface has an empty input region; double-click, F11, Esc and
  the Fullscreen button keep working, aspect kept with black bars.
- Snapshot holds the OpenVR lock only for OpenVR calls, so its process
  spawns cannot stall the preview; process lookup reads /proc instead
  of spawning pgrep.
2026-10-13 19:46:23 +03:00