Skip to content

Commit 5c934f5

Browse files
committed
Don't create the AMD counters while capturing
1 parent 0d1c9c3 commit 5c934f5

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

renderdoc/driver/d3d11/d3d11_debug.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,21 @@ D3D11DebugManager::D3D11DebugManager(WrappedID3D11Device *wrapper)
158158

159159
RenderDoc::Inst().SetProgress(DebugManagerInit, 1.0f);
160160

161-
AMDCounters *counters = new AMDCounters();
162-
if(counters->Init((void *)m_pDevice))
161+
if(RenderDoc::Inst().IsReplayApp())
163162
{
164-
m_pAMDCounters = counters;
163+
AMDCounters *counters = new AMDCounters();
164+
if(counters->Init((void *)m_pDevice))
165+
{
166+
m_pAMDCounters = counters;
167+
}
168+
else
169+
{
170+
delete counters;
171+
m_pAMDCounters = NULL;
172+
}
165173
}
166174
else
167175
{
168-
delete counters;
169176
m_pAMDCounters = NULL;
170177
}
171178
}

0 commit comments

Comments
 (0)