···274274 ENTRY_IF_EXT(xrGetD3D11GraphicsRequirementsKHR, KHR_D3D11_enable);
275275#endif // OXR_HAVE_KHR_D3D11_enable
276276277277+#ifdef OXR_HAVE_KHR_D3D12_enable
278278+ ENTRY_IF_EXT(xrGetD3D12GraphicsRequirementsKHR, KHR_D3D12_enable);
279279+#endif // OXR_HAVE_KHR_D3D12_enable
280280+277281 /*
278282 * Not logging here because there's no need to loudly advertise
279283 * which extensions the loader knows about (it calls this on
···771771 XrGraphicsBindingD3D11KHR const *d3d11 =
772772 OXR_GET_INPUT_FROM_CHAIN(createInfo, XR_TYPE_GRAPHICS_BINDING_D3D11_KHR, XrGraphicsBindingD3D11KHR);
773773 if (d3d11 != NULL) {
774774- OXR_VERIFY_ARG_NOT_NULL(log, d3d11->device);
774774+ // we know the fields of this struct are OK by now since they were checked with XrSessionCreateInfo
775775776776 if (!sys->gotten_requirements) {
777777 return oxr_error(log, XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING,
···787787 OXR_SESSION_ALLOCATE_AND_INIT(log, sys, *out_session);
788788 OXR_ALLOCATE_NATIVE_COMPOSITOR(log, xsi, *out_session);
789789 return oxr_session_populate_d3d11(log, sys, d3d11, *out_session);
790790+ }
791791+#endif
792792+793793+#ifdef XR_USE_GRAPHICS_API_D3D12
794794+ XrGraphicsBindingD3D12KHR const *d3d12 =
795795+ OXR_GET_INPUT_FROM_CHAIN(createInfo, XR_TYPE_GRAPHICS_BINDING_D3D12_KHR, XrGraphicsBindingD3D12KHR);
796796+ if (d3d12 != NULL) {
797797+ // we know the fields of this struct are OK by now since they were checked with XrSessionCreateInfo
798798+799799+ if (!sys->gotten_requirements) {
800800+ return oxr_error(log, XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING,
801801+ "Has not called xrGetD3D12GraphicsRequirementsKHR");
802802+ }
803803+ XrResult result = oxr_d3d12_check_device(log, sys, d3d12->device);
804804+805805+ if (!XR_SUCCEEDED(result)) {
806806+ return result;
807807+ }
808808+809809+810810+ OXR_SESSION_ALLOCATE_AND_INIT(log, sys, *out_session);
811811+ OXR_ALLOCATE_NATIVE_COMPOSITOR(log, xsi, *out_session);
812812+ return oxr_session_populate_d3d12(log, sys, d3d12, *out_session);
790813 }
791814#endif
792815 /*