From b6bb4421621114bf502756449aaea203f48d33da Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 3 May 2022 17:56:26 -0500 Subject: [PATCH] st/oxr: Verify the LUID we get --- src/xrt/state_trackers/oxr/oxr_d3d11.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xrt/state_trackers/oxr/oxr_d3d11.cpp b/src/xrt/state_trackers/oxr/oxr_d3d11.cpp index 32cb37e35..c5d8a1b13 100644 --- a/src/xrt/state_trackers/oxr/oxr_d3d11.cpp +++ b/src/xrt/state_trackers/oxr/oxr_d3d11.cpp @@ -51,6 +51,10 @@ oxr_d3d11_get_requirements(struct oxr_logger *log, if (sys->xsysc->info.client_d3d_deviceLUID_valid) { sys->suggested_d3d_luid = reinterpret_cast(sys->xsysc->info.client_d3d_deviceLUID); + if (nullptr == getAdapterByLUID(sys->xsysc->info.client_d3d_deviceLUID, U_LOGGING_INFO)) { + return oxr_error(log, XR_ERROR_RUNTIME_FAILURE, + " failure enumerating adapter for LUID specified for use."); + } } else { auto adapter = getAdapterByIndex(0, U_LOGGING_INFO); if (adapter == nullptr) {