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

No way to transition out of SYNCHRONIZED state from the application side #162

Open
yshui opened this issue Dec 19, 2023 · 3 comments
Open
Labels
synced to gitlab A corresponding issue has been filed in the Khronos internal GitLab

Comments

@yshui
Copy link

yshui commented Dec 19, 2023

The only state available from SYNCHRONIZED/FOCUS/VISIBLE is STOPPING, and that can only be initiated by the runtime. Calling xrEndSession from SYNCHRONIZED generates a XR_ERROR_SESSION_NOT_STOPPING. This might make sense for normal VR scene applications, but an overlay application has legitimate reasons to want to pause rendering temporarily and resume later, e.g. the user choose to hide the overlay. Right now the options are:

  1. continue running the frame loop, and not submitting anything
  2. destroy and then recreate a session

neither of those feel optimal. I think it should be OK to call xrEndSession when the state is not STOPPING.

(Technically as it is defined:

Calling xrEndSession always transitions a session to the not running state, regardless of any errors returned.

I can already use xrEndSession in this way, just have to ignore the error)

@yshui
Copy link
Author

yshui commented Dec 19, 2023

Also the spec doesn't say what happens when an SYNCHRONIZED application stops calling xrBegin/End/WaitFrame.

@Wallbraker
Copy link
Contributor

You can use xrRequestExitSession to transition from SYNCHRONIZED/VISIBLE/FOCUSED. But this will force you to destroy the session, there is currently no way for the application to request going to IDLE.

@rpavlik-bot rpavlik-bot added the synced to gitlab A corresponding issue has been filed in the Khronos internal GitLab label Jan 3, 2024
@rpavlik-bot
Copy link
Collaborator

An issue (number 2173) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2173 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
synced to gitlab A corresponding issue has been filed in the Khronos internal GitLab
Projects
None yet
Development

No branches or pull requests

3 participants