[WebXR] Revert WebXRSession changes from 312788@main#64744
Conversation
|
EWS run on previous version of this PR (hash 6f3921b) Details
|
| // Update m_requestData AFTER submitFrame(). This ensures the | ||
| // UIProcess coordinator doesn't see new activeLayerHandles until | ||
| // AFTER the current frame's submitFrame() has been processed. | ||
| session.updateRequestDataFromActiveRenderState(); |
There was a problem hiding this comment.
Actually I think we might not even need this. We can keep everything together now because we have applied countermeasures at OpenXR side which will allow us to produce sensible rendering even if the processes disagree about the active layers.
Contrary to what I mentioned in my previous commits applying the render state above would still be conformant to the spec because it happens before calling the frame callbacks. This means that calling updateRenderState() during rAF won't change the current frame because the render state has been applied before.
That's why I think it'd be better to avoid splitting these calls and keep the code together in apply render state as it was before my change. OpenXR should be fine.
There was a problem hiding this comment.
So you're fine with me reverting the changes to WebXRSession made in b0baaea?
6f3921b to
726ac8a
Compare
|
EWS run on current version of this PR (hash 726ac8a) Details
|
https://bugs.webkit.org/show_bug.cgi?id=314623 rdar://176829186 Reviewed by Cameron McCormack. 312788@main moved applyPendingRenderState() from before the rendering block to after it in WebXRSession::onFrame(), and moved inputSources->update() to run unconditionally before the render block. These changes were made to fix an OpenXR-specific crash involving swapchain acquire/release mismatches when activeLayerHandles changed mid-frame. The OpenXR author has confirmed these WebXRSession changes are no longer required for OpenXR -- the OpenXR-side changes in that commit (snapshotting active layers at beginFrame and filtering at endFrame) are sufficient to prevent the crash without modifying the shared WebXRSession frame loop. Reverting restores the original frame loop ordering: - applyPendingRenderState() before frameShouldBeRendered() (step 7 before 6) - inputSources->update() at step 6.4 inside the render block This fixes first-frame rendering on visionOS where the deferred applyPendingRenderState meant frameShouldBeRendered() would see a null baseLayer and skip the entire render block. * Source/WebCore/Modules/webxr/WebXRSession.cpp: (WebCore::WebXRSession::applyPendingRenderState): (WebCore::WebXRSession::onFrame): (WebCore::WebXRSession::updateRequestDataFromActiveRenderState): Deleted. * Source/WebCore/Modules/webxr/WebXRSession.h: Canonical link: https://commits.webkit.org/313131@main
726ac8a to
3c73508
Compare
|
Committed 313131@main (3c73508): https://commits.webkit.org/313131@main Reviewed commits have been landed. Closing PR #64744 and removing active labels. |
3c73508
726ac8a
🧪 win-tests🧪 api-mac🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 mac-AS-debug-wk2🧪 api-gtk