Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about Session lifecyle state #21

Closed
sinojelly opened this issue Jul 4, 2019 · 3 comments

Comments

@sinojelly
Copy link

commented Jul 4, 2019

In the state transition diagram , when the application calls xrEndSession, Runtime will switch from the Stopping state to the Idle state, and then switch to the Exiting state when the user issues an exit request.
I don't quite understand how user quite request affects state switching. Which openxr function is called by the application?
My understanding is that when the application calls xrEndSession, Runtime switches from Stopping to Exiting? is it right?Thanks!

@brycehutchings

This comment has been minimized.

Copy link

commented Jul 5, 2019

My understanding is that when the application calls xrEndSession, Runtime switches from Stopping to Exiting? is it right?Thanks!

Not quite. The state will transition from Stopping to Idle and then its up to the runtime to decide when to transition to either Ready or Exiting. In OpenXR 0.90, the decision of how to transition states is up to the runtime. For example, a runtime may support task switching and keep an app in Idle while another app is in focus, and then move the original app from Idle to Ready when the user switches back. That same runtime may support a sort of XR task manager and terminate background XR apps, in which case the runtime would transition the apps from Idle to Exiting. In OpenXR 0.90, there is no mechanism for the app to instruct the runtime that it wants to transition to Exiting.

In OpenXR 1.0 we are adding a method for an app to ask to be transitioned to the Exiting state. This will enable the scenario where the app itself wants to control gracefully ending its Session.

@rpavlik

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2019

@brycehutchings can you re-review and determine if this is resolved in 1.0?

@brycehutchings

This comment has been minimized.

Copy link

commented Jul 30, 2019

We've cleaned up this and it is now good. xrRequestExitSession is there to instruct the runtime the application wishes to transition to EXITING state. We've also improved the description of the session states and how they transition, including the independent "running" state that exists between xrBeginSession and xrEndSession.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.