Looks like it first calls EnumerateViews()
from the FOpenXRHMD
constructor. If that call ends up calling xrWaitFrame()
, then it’s probably a bug in the runtime. Otherwise UE4 isn’t initializing the views before trying to render them. The game and render threads are pipelined and xrWaitFrame()
is run on the game thread, so it would pass the invalid data to the first frame rendered after the OpenXR session is initialized.
Either way, it might be fixable by checking if the value is correct before starting rendering in OnBeginRendering_RenderThread()
. Note that it copies PipelinedFrameStateGame
into PipelinedFrameStateRendering
at the start, so make sure you check the correct one.