From 37e56e91b0745350e3b33263c5ce8ff8b1a19fe7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 27 Oct 2016 19:18:58 +0200 Subject: [PATCH] Only emit debug text in non-RELEASE --- renderdoc/driver/d3d12/d3d12_commands.cpp | 20 ++++++++++++++++---- renderdoc/driver/d3d12/d3d12_device.cpp | 12 +++++++++--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_commands.cpp b/renderdoc/driver/d3d12/d3d12_commands.cpp index b120a635f..2bb772fea 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.cpp +++ b/renderdoc/driver/d3d12/d3d12_commands.cpp @@ -146,6 +146,12 @@ WrappedID3D12CommandQueue::WrappedID3D12CommandQueue(ID3D12CommandQueue *real, m_pReal->QueryInterface(__uuidof(ID3D12DebugCommandQueue), (void **)&m_WrappedDebug.m_pReal); +#if defined(RELEASE) + const bool debugSerialiser = false; +#else + const bool debugSerialiser = true; +#endif + if(RenderDoc::Inst().IsReplayApp()) { m_pSerialiser = serialiser; @@ -156,9 +162,9 @@ WrappedID3D12CommandQueue::WrappedID3D12CommandQueue(ID3D12CommandQueue *real, } else { - m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, true); + m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser); - m_pSerialiser->SetDebugText(true); + m_pSerialiser->SetDebugText(debugSerialiser); } m_pSerialiser->SetUserData(m_pDevice->GetResourceManager()); @@ -584,15 +590,21 @@ WrappedID3D12GraphicsCommandList::WrappedID3D12GraphicsCommandList(ID3D12Graphic if(m_pReal) m_pReal->QueryInterface(__uuidof(ID3D12DebugCommandList), (void **)&m_WrappedDebug.m_pReal); +#if defined(RELEASE) + const bool debugSerialiser = false; +#else + const bool debugSerialiser = true; +#endif + if(RenderDoc::Inst().IsReplayApp()) { m_pSerialiser = serialiser; } else { - m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, true); + m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser); - m_pSerialiser->SetDebugText(true); + m_pSerialiser->SetDebugText(debugSerialiser); } m_pSerialiser->SetUserData(m_pDevice->GetResourceManager()); diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index d04c1a19b..9d7109a50 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -205,6 +205,12 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara m_GPUSyncHandle = NULL; m_GPUSyncCounter = 0; +#if defined(RELEASE) + const bool debugSerialiser = false; +#else + const bool debugSerialiser = true; +#endif + if(RenderDoc::Inst().IsReplayApp()) { m_State = READING; @@ -219,9 +225,9 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara else { m_State = WRITING_IDLE; - m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, true); + m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser); - m_pSerialiser->SetDebugText(true); + m_pSerialiser->SetDebugText(debugSerialiser); } m_DebugManager = NULL; @@ -1797,7 +1803,7 @@ Serialiser *WrappedID3D12Device::GetThreadSerialiser() ser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser); ser->SetUserData(m_ResourceManager); - ser->SetDebugText(true); + ser->SetDebugText(debugSerialiser); ser->SetChunkNameLookup(&GetChunkName);