Move DX12 debug layer flag out of common code

Change-Id: I5c0a80c772b470be7970abe428cfd2f7a7ea17dd
This commit is contained in:
Amit Prakash
2018-05-24 21:42:30 +01:00
committed by baldurk
parent 288e0239c2
commit c82ff2de93
8 changed files with 22 additions and 19 deletions
+6 -2
View File
@@ -58,7 +58,11 @@ static void GPA_LoggingCallback(GPA_Logging_Type messageType, const char *pMessa
#define GPA_WARNING(text, status) \
RDCWARN(text ". %s", m_pGPUPerfAPI->GPA_GetStatusAsStr((GPA_Status)status));
AMDCounters::AMDCounters() : m_pGPUPerfAPI(NULL), m_gpaSessionCounter(0u), m_passCounter(-1)
AMDCounters::AMDCounters(bool dx12DebugLayerEnabled)
: m_pGPUPerfAPI(NULL),
m_gpaSessionCounter(0u),
m_passCounter(-1),
m_dx12DebugLayerEnabled(dx12DebugLayerEnabled)
{
}
@@ -112,7 +116,7 @@ bool AMDCounters::Init(ApiType apiType, void *pContext)
bool disableCounters = false;
if(apiType == ApiType::Dx12 && RenderDoc::Inst().IsDX12DebugLayerEnabled())
if(apiType == ApiType::Dx12 && m_dx12DebugLayerEnabled)
{
// Disable counters in DX12 Debug configuration
void *versionFunc = Process::GetFunctionAddress(module, "GPA_GetVersion");