KhronosGroup / OpenXR-Tutorials

OpenXR Tutorials
https://www.openxr-tutorial.com/
Apache License 2.0
76 stars 15 forks source link

Fix DX hang and added safety check #107

Closed Xelarse closed 8 months ago

Xelarse commented 8 months ago

If using DX11 or DX12 on a machine with multiple graphics adapters (laptop with iGPU & dGPU) and the first adapter that EnumAdapters returns is the iGPU when OXR is expecting the dGPU; the application hangs infinitely. Mostly due to the oversight of forgetting to increment i each iteration of the while.

To prevent this hang entirely I've swapped the while out in favour of a for loop and added a small check underneath to throw if the adapter OXR wants isn't found by DX.

CLAassistant commented 8 months ago

CLA assistant check
All committers have signed the CLA.