diff options
| author | Stenzek <stenzek@gmail.com> | 2019-05-12 14:42:16 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-06-08 20:11:49 +1000 |
| commit | 9316e25652c8e2bd3b844b225e549452bcfc86ec (patch) | |
| tree | 84b4c4a386a3a38200fd62e28757c921dc874768 /Source/Core/VideoBackends/D3D12/DXContext.cpp | |
| parent | 0177c6c2c7ef1252c47e01490a9e60792f8184ad (diff) | |
D3DCommon: Fallback to base CreateSwapChain on failure
It appears that some older drivers do not support
CreateSwapChainForHwnd, resulting in DXGI_ERROR_INVALID_CALL. For these
cases, fall back to the base CreateSwapChain() from DXGI 1.0.
In theory this should also let us run on Win7 without the platform
update, but in reality we require the newer shader compiler so this
probably won't work regardless. Also any hardware of this vintage is
unlikely to run Dolphin well.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/DXContext.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/DXContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/DXContext.cpp b/Source/Core/VideoBackends/D3D12/DXContext.cpp index a2f089220f..63eb4dca51 100644 --- a/Source/Core/VideoBackends/D3D12/DXContext.cpp +++ b/Source/Core/VideoBackends/D3D12/DXContext.cpp @@ -43,7 +43,7 @@ std::vector<u32> DXContext::GetAAModes(u32 adapter_index) ComPtr<ID3D12Device> temp_device = g_dx_context ? g_dx_context->m_device : nullptr; if (!temp_device) { - ComPtr<IDXGIFactory2> temp_dxgi_factory = D3DCommon::CreateDXGIFactory(false); + ComPtr<IDXGIFactory> temp_dxgi_factory = D3DCommon::CreateDXGIFactory(false); if (!temp_dxgi_factory) return {}; @@ -57,7 +57,8 @@ std::vector<u32> DXContext::GetAAModes(u32 adapter_index) return {}; } - HRESULT hr = d3d12_create_device(nullptr, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&temp_device)); + HRESULT hr = + d3d12_create_device(adapter.Get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&temp_device)); if (!SUCCEEDED(hr)) return {}; } |
