mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-24 16:01:34 +02:00
- Once the guest eye format is known, the eye swapchains are recreated once in the format that keeps its bytes: the eye format, else its UNORM/SRGB sibling (raw copy), else the other channel order with the same sRGB-ness (a blit that only swizzles). Mixed order-and-gamma cases no longer go through a gamma-converting blit; if only that remains, it is logged. - The desktop mirror segment is created with O_EXCL after removing our own stale segment (a crashed run's leftover), and must be private to this user before eye images are written to it. - A new frame_mutex_ is held for the whole XR frame cycle and by every path that can destroy the session (taken before mutex_). That lets the cycle release mutex_ while it blocks in xrWaitFrame, so guest render-thread hooks no longer wait out the runtime's pacing. Swapchain-image and fence waits stay under mutex_; they return promptly unless the GPU or compositor stalls, and they run while guest eye bindings are copied.