diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-09-18 16:04:58 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-09-18 16:04:58 +0000 |
| commit | e21c1c376a8d050ae959761fa46b2264076eb21d (patch) | |
| tree | f7c70de7ea30e22a7c5e451160847231a6ae62a8 /Graphics/GraphicsEngineD3D12 | |
| parent | Fixed some issues on Win32 platform (diff) | |
| download | DiligentCore-e21c1c376a8d050ae959761fa46b2264076eb21d.tar.gz DiligentCore-e21c1c376a8d050ae959761fa46b2264076eb21d.zip | |
D3D12 backend: updated debug interface settings
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index b6e9cd30..0dfa412f 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -147,7 +147,7 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat CComPtr<ID3D12Device> d3d12Device; try { -#if defined(_DEBUG) +#ifdef DEVELOPMENT // Enable the D3D12 debug layer. { CComPtr<ID3D12Debug> debugController; @@ -199,7 +199,7 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat CHECK_D3D_RESULT_THROW(hr, "Failed to crate warp device"); } -#if _DEBUG +#ifdef DEVELOPMENT { CComPtr<ID3D12InfoQueue> pInfoQueue; hr = d3d12Device->QueryInterface(__uuidof(pInfoQueue), reinterpret_cast<void**>(static_cast<ID3D12InfoQueue**>(&pInfoQueue))); @@ -227,6 +227,12 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat hr = pInfoQueue->PushStorageFilter(&NewFilter); VERIFY(SUCCEEDED(hr), "Failed to push storage filter"); + + hr = pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_CORRUPTION, true); + VERIFY(SUCCEEDED(hr), "Failed to set break on corruption"); + + hr = pInfoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, true); + VERIFY(SUCCEEDED(hr), "Failed to set break on error"); } } #endif |
