Refactor stereo frame worker and interpolation tests for enhanced VR performance

- Updated stereo_frame_worker_smoke.cpp to allow dynamic headset rates and prediction lead time.
- Improved logging to include motion diagnostics and adjusted frame submission logic based on headset frequency.
- Enhanced stereo_interpolation_test.cpp with additional tests for camera motion separation and playback cadence.
- Introduced MkwVRReadSceneView function to read the camera view matrix for improved scene rendering.
- Modified VR first-person logic to support scene view reading and validation.
- Added scene_camera.hpp to encapsulate camera motion handling and inverse view calculations.
- Ensured that the VR integration layer correctly logs motion diagnostics and handles scene playback accurately.
This commit is contained in:
iChris4 committed 2026-10-01 00:37:49 +02:00
1 parent 85fab2fa09
commit e7eab8a6b2
19 files changed
+1978 -114

No files matched your search

+6 -1
View File
@@ -197,7 +197,8 @@ typedef struct {
AuroraStereoFrameMode mode;
uint64_t contentTag;
// Predicted display time converted to std::chrono::steady_clock nanoseconds.
// Zero disables temporal interpolation for this packet.
// Used for diagnostics. Scene playback has its own clock; the eye poses remain
// predicted for this time even when the runtime looks several game frames ahead.
uint64_t displayTimeNanos;
// Optional; inactive when zero-initialised.
AuroraCockpit cockpit;
@@ -334,6 +335,10 @@ void aurora_set_stereo_scene_anchor(const float anchorFromScene[12]);
// The sealed frame then owns that scale: each eye's head/IPD translation is
// rescaled from the packet's AuroraCockpit::unitsPerMeter to it.
void aurora_set_stereo_scene_anchor_scaled(const float anchorFromScene[12], float unitsPerMeter);
// Recorded world-to-view camera, copied on the GX thread beside the scene anchor.
// Null disables camera-separated interpolation for this frame.
void aurora_set_stereo_scene_view(const float viewFromWorld[12]);
// GX producer thread, after the scene anchor and before sealing that frame.
void aurora_set_stereo_cockpit_item(const AuroraCockpitItem* item);
// Copies a user-supplied Race/Common.szs archive. May be called on the guest
+8
View File
@@ -63,6 +63,12 @@ typedef struct {
uint64_t framesReplayUnsafe;
uint64_t slotReductions;
uint64_t lateSealDrops;
// Matched identity does not guarantee usable interpolation transforms.
uint32_t preparedDraws; // latest seal: draws with usable endpoint pairs
uint32_t rejectedDraws; // latest seal: paired draws rejected by transform guards
uint32_t vertexMotionDraws; // latest seal: CPU-authored quads with usable motion pairs
uint32_t vertexMotionHeld; // latest seal: such quads drawn where recorded (no unambiguous partner yet)
uint64_t animationWrapCuts; // cumulative rigid animation resets held at their new phase
} AuroraFrameInterpolationDiagnostics;
void aurora_get_frame_interpolation_diagnostics(AuroraFrameInterpolationDiagnostics* diagnostics);
@@ -76,6 +82,8 @@ uint32_t aurora_get_frame_interpolation_fps();
// each headset deadline, leaving guest simulation and VI timing at 60 Hz.
void aurora_set_stereo_frame_interpolation(bool enabled);
bool aurora_get_stereo_frame_interpolation();
// Logs scene sampling and transform acceptance separately from headset submission FPS.
void aurora_set_stereo_motion_logging(bool enabled);
// Newly encountered GX pipelines compile on the bounded worker queue. Draws whose pipeline is not
// ready are skipped rather than stalling submission, and pick it up once compilation finishes.