An error in the way frames were submitted to XR resulted in intermittent
slowdown that fooled me for a while as being shader compilation stutter,
and had me down the wrong track of investigating that.
However this was actually the root cause. This should bring Baiji up to
performance parity with the current Dolphin release, as near as I can tell.
Resolves Issue #13.
The previous fix to fit them in their dialog box often unseated
the arrow from the widget it is trying to point at. With the user
so actively interacting with the widgets to get the help,
including having to hold the pointer steady to keep it where they
can read it (arguably a problem of its own), I don't think we need
to quite that aggressively point at the target widget.
Steam OS intepreted that as a resize of the window and recentered it.
This caused a lot of displeasing UI churn.
This still leaves the little chevrons pointed at the wrong places
sometimes but it is still a much better user experience.
In flat Vulkan mode, Steam Frame controller buttons can appear not to
reach the game while the system's laser-pointer mode still owns focus.
This is an easy mistake to make when starting a game from the headset.
After a successful boot, show an informational dialog for explicit Flat
Display (Vulkan) mode and for legacy configurations with OpenXR disabled.
The check happens after boot metadata and per-game VR settings are loaded,
so immersive VR and Stereo 3D Screen launches are not interrupted.
Add the requested reminder text and a Never See This Dialog Again
checkbox. Persist the opt-out in Main.Interface, and leave it unchecked by
default so the reminder appears for new users.
Keep Externals/OpenXR pinned to Khronos' upstream 1.1.63 commit
instead of carrying local source edits as an unreachable submodule commit.
Record the three Frame loader compatibility changes in the parent tree as
OpenXR-Loader-Exceptions.patch.
When ENABLE_VR is configured, copy the pinned SDK into the binary tree,
apply the patch to that copy, and build the loader from there. This leaves
the checked-out submodule clean and supports read-only source mounts in
container builds. CMake verifies the patch applies to the expected SDK
files before adding the patched copy to the build.
Immersive VR previously used the full runtime-reported left/right view
positions, with Units per Meter scaling both world geometry and the
per-eye offsets. That left no direct way to soften strong near-field
pop-out without also changing the apparent world scale.
Add Graphics.VR.StereoSeparation as a 0-200 percent setting, defaulting
to 100 percent. Scale each eye's positional offset around the average
eye center independently of shared head translation. At 100 percent the
projection is unchanged, 0 percent brings the virtual view positions
together toward mono, and values above 100 percent amplify stereo depth.
Units per Meter continues to set world scale and head-motion mapping.
Expose the setting in the global VR pane and per-game VR configuration,
include it in game VR override application/reset, and refresh cached
projection rows when it changes. Help text explains the scale/depth
tradeoff, possible near-field comfort benefit, and that Stereo 3D Screen
continues to use the existing Stereoscopic Depth control.
StereoScreen previously submitted and released each Vulkan eye separately
while its image writes could still be in flight. On native Steam Frame
this produced conspicuous doubled/stale-image hiccups and apparent
backward jumps, even though API-side frame identities remained ordered.
A capture covering 16,699 XFB copies found no gameplay source regression,
GPU-submit reversal, XR display-time reversal, or eye-ID mismatch.
SteamVR motion smoothing was already forced off.
For Baiji StereoScreen, defer eye releases until both blits are recorded,
submit their GPU work together, wait once for completion, release both
images under the graphics-queue lock, then publish the quad layers.
Keep this wait even with timeline semaphores enabled: submitted writes
alone were insufficient for correct image delivery on Frame. The wait
trades some CPU/GPU overlap for a completed stereo pair.
Also exclude xrEndFrame from the video blit/completion/release/publish
transaction with a handoff mutex. The previous atomic flag had a
check-to-submit race. Take the handoff lock before publish/queue locks,
and never hold the graphics-queue lock during the completion wait.
PresentBackbuffer already advances frame resources; the stereo submit
must not advance them again.
CPU-side handoff locking alone did not cure the artifact. Headset tests
with the completed-pair handoff in Super Mario Galaxy 2 at 2x/120 Hz
confirmed that remaining misses look like ordinary dropped frames,
rather than doubled images or huge hiccups. The clean Frame SDK build
and launcher CLI smoke check passed. Remove the temporary timing/order
capture code and retain the findings and lock-order guidance in AGENTS.md.
Diagnosis confirmed: the runtime rebases the reference space on system
recenter (logged head_yaw matched the user's per-run offset exactly), and
controllers share the HMD's tracking frame. Keep only the low-volume
reference-space-change and recenter log lines.
The runtime rebases the reference space on system recenter, universe
switches, and relocalization, and notifies apps via
XrEventDataReferenceSpaceChangePending. Dolphin only logged the event, so
the world-locked flat-screen quad kept its stale coordinates and appeared
to jump by the rebase yaw every time the user used the system recenter
(the HMD's yaw in the runtime's arbitrary local frame — random per run).
On the event, invalidate the cached flat-screen pose so the panel is
re-placed in front of the user's current gaze, which is also the expected
behavior after a system recenter. Log the event's poseInPreviousSpace yaw
delta, and add a throttled view-yaw vs aim-yaw diagnostic to check whether
the runtime reports controllers in a different tracking frame.
Remove the reference-space recreation recenter, ScreenYawOffset config, and
debug logging. Restore the original home-position recenter and world-locked
flat screen placement so we can diagnose the underlying issue from a clean
baseline.