mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
D3D11: Create debug device when validation layer is enabled in options
This commit is contained in:
parent
ce59121748
commit
c90b0bf532
@ -307,9 +307,9 @@ HRESULT Create(HWND wnd)
|
|||||||
swap_chain_desc.Stereo =
|
swap_chain_desc.Stereo =
|
||||||
g_ActiveConfig.iStereoMode == STEREO_QUADBUFFER || factory->IsWindowedStereoEnabled();
|
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
|
// 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.
|
// 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,
|
hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_DEBUG,
|
||||||
supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS,
|
supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS,
|
||||||
@ -335,8 +335,7 @@ HRESULT Create(HWND wnd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (!g_Config.bEnableValidationLayer || FAILED(hr))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, 0, supported_feature_levels,
|
hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, 0, supported_feature_levels,
|
||||||
NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &featlevel,
|
NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &featlevel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user