From e21c1c376a8d050ae959761fa46b2264076eb21d Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 18 Sep 2019 09:04:58 -0700 Subject: D3D12 backend: updated debug interface settings --- Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') 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 d3d12Device; try { -#if defined(_DEBUG) +#ifdef DEVELOPMENT // Enable the D3D12 debug layer. { CComPtr 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 pInfoQueue; hr = d3d12Device->QueryInterface(__uuidof(pInfoQueue), reinterpret_cast(static_cast(&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 -- cgit v1.2.3