diff options
| author | Stenzek <stenzek@gmail.com> | 2017-04-30 00:39:52 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-09-03 14:14:19 +1000 |
| commit | c90b0bf5329b099e30fbbcfeaba3f21fa8b4d279 (patch) | |
| tree | 6baa5918644afcd40cc922bbc486152124adc5e3 /Source | |
| parent | ce59121748695118c5cc4e010cdd84449d16911c (diff) | |
D3D11: Create debug device when validation layer is enabled in options
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DBase.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index b638a50e74..e4b16a36fb 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -307,9 +307,9 @@ HRESULT Create(HWND wnd) swap_chain_desc.Stereo = g_ActiveConfig.iStereoMode == STEREO_QUADBUFFER || factory->IsWindowedStereoEnabled(); -#if defined(_DEBUG) || defined(DEBUGFAST) // Creating debug devices can sometimes fail if the user doesn't have the correct // version of the DirectX SDK. If it does, simply fallback to a non-debug device. + if (g_Config.bEnableValidationLayer) { hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_DEBUG, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, @@ -335,8 +335,7 @@ HRESULT Create(HWND wnd) } } - if (FAILED(hr)) -#endif + if (!g_Config.bEnableValidationLayer || FAILED(hr)) { hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, 0, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &featlevel, |
