microsoft/OpenXR-MixedReality

HoloLens 2 Direct3D 12 performance considerations

emaschino opened this issue · 1 comments

Hi,

As HoloLens 2 OpenXR runtime reports XR_KHR_D3D12_enable extension as supported, I gave it a try adjusting the hello_xr sample from Khronos group to have it running on HoloLens 2 device using either D3D11 or D3D12 API. There's a noticeable drop in performances switching from D3D11 to D3D12: hologram display is far less smooth when moving the head left/right, up/down, for example. Is this something expected w.r.t. HoloLens 2 hardware? It's noteworthy that VPRT isn't implemented in the hello_xr sample, but its D3D11 version nevertheless seems to be on par, performance-wise, with the D3D11-only BasicXrApp sample in this repo that do implement VPRT.

Thanks.

VPRT probably doesn't make a big difference, especially for such a simple rendering. The main problem with hello xr is that the HoloLens needs apps to submit the projection layer as a texture array and hello xr doesn't do this. See https://learn.microsoft.com/en-us/windows/mixed-reality/develop/native/openxr-best-practices#render-with-texture-array-and-vprt

However I can't explain why hello xr would be slower with d3d12 than 11 with the same app, but both will be on a slow path in this case.