Only emit debug text in non-RELEASE

This commit is contained in:
baldurk
2016-10-27 19:18:58 +02:00
parent f7c155acd3
commit 37e56e91b0
2 changed files with 25 additions and 7 deletions
+16 -4
View File
@@ -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());
+9 -3
View File
@@ -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);