You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (XR_FAILED(xrGetInstanceProcAddr(xrInstance, "xrGetD3D11GraphicsRequirementsKHR", reinterpret_cast<PFN_xrVoidFunction*>(&xrGetD3D11GraphicsRequirementsKHR))))
92
+
{
93
+
LOG_ERROR_AND_THROW("Failed to get xrGetD3D11GraphicsRequirementsKHR. Make sure that XR_KHR_D3D11_enable extension is enabled.");
LOG_WARNING_MESSAGE("AdapterId is ignored when OpenXR is used as the suitable adapter is selected by OpenXR runtime");
261
+
}
262
+
// There should be only one adapter
263
+
AdapterId = 0;
264
+
}
265
+
#endif
266
+
211
267
CComPtr<IDXGIAdapter1> SpecificAdapter;
212
-
if (EngineCI.AdapterId != DEFAULT_ADAPTER_ID)
268
+
if (AdapterId != DEFAULT_ADAPTER_ID)
213
269
{
214
-
auto Adapters = FindCompatibleAdapters(EngineCI.GraphicsAPIVersion);
215
-
if (EngineCI.AdapterId < Adapters.size())
216
-
SpecificAdapter = Adapters[EngineCI.AdapterId];
270
+
auto Adapters = FindCompatibleAdapters(d3dFeatureLevel, AdapterLUID);
271
+
if (AdapterId < Adapters.size())
272
+
SpecificAdapter = Adapters[AdapterId];
217
273
else
218
274
{
219
-
LOG_ERROR_AND_THROW(EngineCI.AdapterId, " is not a valid hardware adapter id. Total number of compatible adapters available on this system: ", Adapters.size());
275
+
LOG_ERROR_AND_THROW(AdapterId, " is not a valid hardware adapter id. Total number of compatible adapters available on this system: ", Adapters.size());
if (XR_SUCCEEDED(xrGetInstanceProcAddr(xrInstance, "xrGetVulkanGraphicsRequirements2KHR", reinterpret_cast<PFN_xrVoidFunction*>(&xrGetVulkanGraphicsRequirements2KHR))))
179
+
if (XR_FAILED(xrGetInstanceProcAddr(xrInstance, "xrGetVulkanGraphicsRequirements2KHR", reinterpret_cast<PFN_xrVoidFunction*>(&xrGetVulkanGraphicsRequirements2KHR))))
0 commit comments