mirror of https://github.com/AxioDL/boo.git
D3D12 -> D3D11 device fallback
This commit is contained in:
parent
c7df255c24
commit
affb4e98d3
lib/win
|
@ -141,9 +141,8 @@ public:
|
|||
|
||||
/* Create device */
|
||||
HRESULT hr = MyD3D12CreateDevice(nullptr, D3D_FEATURE_LEVEL_11_0, __uuidof(ID3D12Device), &m_3dCtx.m_ctx12.m_dev);
|
||||
if (FAILED(hr))
|
||||
Log.report(logvisor::Fatal, "unable to create D3D12 device");
|
||||
|
||||
if (!FAILED(hr))
|
||||
{
|
||||
/* Obtain DXGI Factory */
|
||||
hr = MyCreateDXGIFactory1(__uuidof(IDXGIFactory2), &m_3dCtx.m_ctx12.m_dxFactory);
|
||||
if (FAILED(hr))
|
||||
|
@ -175,6 +174,12 @@ public:
|
|||
Log.report(logvisor::Info, "initialized D3D12 renderer");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Some Win10 client HW doesn't support D3D12 (despite being supposedly HW-agnostic) */
|
||||
m_3dCtx.m_ctx12.m_dev.Reset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
HMODULE d3d11lib = LoadLibraryW(L"D3D11.dll");
|
||||
if (d3d11lib && !noD3d)
|
||||
|
|
Loading…
Reference in New Issue