Skip to content

Commit

Permalink
Merge pull request #19976 from lvonasek/hotfix-openxr-timing
Browse files Browse the repository at this point in the history
OpenXR - Remove frame limitation
  • Loading branch information
hrydgard authored Feb 13, 2025
2 parents aa384b3 + 2567deb commit 0b5bcef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Common/VR/VRRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,10 @@ bool VR_InitFrame( engine_t* engine ) {
passthroughRunning = (VR_GetConfig(VR_CONFIG_PASSTHROUGH) != 0);
}

// NOTE: OpenXR does not use the concept of frame indices. Instead,
// XrWaitFrame returns the predicted display time.
XrFrameWaitInfo waitFrameInfo = {};
waitFrameInfo.type = XR_TYPE_FRAME_WAIT_INFO;
waitFrameInfo.next = NULL;

frameState.type = XR_TYPE_FRAME_STATE;
frameState.next = NULL;

OXR(xrWaitFrame(engine->appState.Session, &waitFrameInfo, &frameState));
OXR(xrWaitFrame(engine->appState.Session, 0, &frameState));
engine->predictedDisplayTime = frameState.predictedDisplayTime;

XrViewLocateInfo projectionInfo = {};
Expand Down

0 comments on commit 0b5bcef

Please sign in to comment.