Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOpenXR backend #37
OpenXR backend #37
Conversation
|
It looks like if servo/openxrs@e8b301a is the only commit needed then we could just update to a more recent version from upstream openxrs, right? |
|
In theory, yes, but this week i don't trust linkers, build systems, native code, SDKs, and most of all myself; so I'm going to try that update tomorrow and see how that goes. What we have here definitely works. |
|
So, to be clear about the missing blitting piece: can we spell out what's expected? We have a GL texture, a GL handle, and we have a D3D swapchain image. The sample code gets the swapchain image and then does a bunch of d3d rendering. How do we bridge this gap? |
|
We have two D3D swapchain images, one for each eye. We have a single GL texture that contains the data for both eyes. We need to blit each half of the GL texture to the respective D3D swapchain image. This does feel like an extra blit but it isn't, I was told that the HL2 openxr implementation prefers split textures and if you give it a single combined texture it will internally blit anyway (whereas webxr requires a combined texture). It's easier to then just blit here, as the alternative route requires threading the acquired image back through Servo script so GL can render directly to it, which would be annoying. I'd already discussed this with @paulrouget last week, I think he said this should be fairly simple. I just don't understand DX enough to know how to do it here. |
|
@bors-servo r=jdm |
|
|
OpenXR backend This enters immersive mode without erroring, however doesn't yet render anything. I'm waiting for @paulrouget to write the code that blits the two subregions of the supplied openGL/angle texture into the swapchain-supplied D3D surfaces. To work properly this needs the `hl` branch on servo/openxrs, and also the DLL built by https://github.com/microsoft/OpenXR-SDK-VisualStudio/blob/master/loader/openxr_loader_uwp.vcxproj (renamed to `openxr_loader.dll`) r? @jdm
|
The bit I'm still unclear about is how we get the GL texture data into D3D. Since it's an ANGLE-based context, is this where we extract the D3D share handle and use that to draw the sub-parts of the texture to the D3D images? |
|
|
Yes, because it's ANGLE backed we should be able to obtain the D3D texture id (or whatever it's called) and use that with D3D APIs. |
Immersive WebXR on Hololens This PR adds support to the OpenXR backend (servo/webxr#37) for Hololens. We support _entering_ immersive mode, but currently do nothing in immersive mode (servo/webxr#38, applying https://github.com/servo/webxr/tree/d3d11-draw should render some red). This should be ready to land as-is aside from its dependency on #23922. It can be tested on https://manishearth.github.io/webgl-to-webxr/webxr-ar.html (make sure to click through the alerts). This is based on #23922 . This builds off of @paulrouget's work. r? @jdm @paulrouget <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23945) <!-- Reviewable:end -->
Immersive WebXR on Hololens This PR adds support to the OpenXR backend (servo/webxr#37) for Hololens. We support _entering_ immersive mode, but currently do nothing in immersive mode (servo/webxr#38, applying https://github.com/servo/webxr/tree/d3d11-draw should render some red). This should be ready to land as-is aside from its dependency on #23922. It can be tested on https://manishearth.github.io/webgl-to-webxr/webxr-ar.html (make sure to click through the alerts). This is based on #23922 . This builds off of @paulrouget's work. r? @jdm @paulrouget <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23945) <!-- Reviewable:end -->
Immersive WebXR on Hololens This PR adds support to the OpenXR backend (servo/webxr#37) for Hololens. We support _entering_ immersive mode, but currently do nothing in immersive mode (servo/webxr#38, applying https://github.com/servo/webxr/tree/d3d11-draw should render some red). This should be ready to land as-is aside from its dependency on #23922. It can be tested on https://manishearth.github.io/webgl-to-webxr/webxr-ar.html (make sure to click through the alerts). This is based on #23922 . This builds off of @paulrouget's work. r? @jdm @paulrouget <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23945) <!-- Reviewable:end -->
Immersive WebXR on Hololens This PR adds support to the OpenXR backend (servo/webxr#37) for Hololens. We support _entering_ immersive mode, but currently do nothing in immersive mode (servo/webxr#38, applying https://github.com/servo/webxr/tree/d3d11-draw should render some red). This should be ready to land as-is aside from its dependency on #23922. It can be tested on https://manishearth.github.io/webgl-to-webxr/webxr-ar.html (make sure to click through the alerts). This is based on #23922 . This builds off of @paulrouget's work. r? @jdm @paulrouget <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23945) <!-- Reviewable:end -->
Manishearth commentedAug 9, 2019
This enters immersive mode without erroring, however doesn't yet render anything. I'm waiting for @paulrouget to write the code that blits the two subregions of the supplied openGL/angle texture into the swapchain-supplied D3D surfaces.
To work properly this needs the
hlbranch on servo/openxrs, and also the DLL built by https://github.com/microsoft/OpenXR-SDK-VisualStudio/blob/master/loader/openxr_loader_uwp.vcxproj (renamed toopenxr_loader.dll)r? @jdm