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

On some devices, a slow path may be required if the user provides an outputContext? #528

Closed
asajeffrey opened this issue Feb 16, 2019 · 2 comments
Milestone

Comments

@asajeffrey
Copy link

If a user provides an outputContext in the session creation optionas (https://immersive-web.github.io/webxr/#xrsessioncreationoptions-interface), this will contain an HTMLCanvasElement that was created by the document.

In environments where the XR device has a GL context, and the browser has a GL context, but these do not share GL objects (https://www.khronos.org/opengl/wiki/OpenGL_Object#Object_Sharing) such as textures, the GL context of the HTMLCanvasElement will be the browser's not the XR device's. Such an environment can come about when the browser's screen is using a different GPU from the XR device's display.

As a result, when the user provides an outputContext, the UA has little option but to copy the frame buffer out of the browser's GPU into main memory, and then into the XR device's GPU, for each XR animation frame.

If the user does not provide an outputContext, the UA could create one that uses the XR device's GL context, so WebGL draw commands would be executed directly in the XR device's GL context, without needing to blit via main memory each animation frame.

It would be nice if the spec did not preclude such a fast path, and if there was some way to make clear to users when a slow path is required.

@asajeffrey
Copy link
Author

Related: #527

@asajeffrey
Copy link
Author

This issue is addressed by https://immersive-web.github.io/webxr/#contextcompatibility

@cwilso cwilso modified the milestones: May 2019, April 2019 Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants