From 05a8813f5e1a13500ab8f25ee755846283407c97 Mon Sep 17 00:00:00 2001 From: salgrana Date: Mon, 30 May 2016 15:09:59 +0300 Subject: [PATCH] CODEXL-3096 "Hotspot Summary -> Command Buffers Summary" does not list all the command buffers --- .../AMDTGpuProfiling/gpTraceDataContainer.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CodeXL/Components/GpuProfiling/AMDTGpuProfiling/gpTraceDataContainer.cpp b/CodeXL/Components/GpuProfiling/AMDTGpuProfiling/gpTraceDataContainer.cpp index f42978f90..18316748e 100644 --- a/CodeXL/Components/GpuProfiling/AMDTGpuProfiling/gpTraceDataContainer.cpp +++ b/CodeXL/Components/GpuProfiling/AMDTGpuProfiling/gpTraceDataContainer.cpp @@ -1082,7 +1082,10 @@ void gpTraceDataContainer::CloseCommandList(APIInfo* pAPIInfo) m_commandListUnAttachedCalls.removeOne(pItem); } - m_commandListInstancesVector << currentInstanceData; + if (!currentInstanceData.m_sampleIds.isEmpty()) + { + m_commandListInstancesVector << currentInstanceData; + } } } } @@ -1315,7 +1318,15 @@ QString gpTraceDataContainer::QueueDisplayName(const QString& queuePtrStr) int gpTraceDataContainer::CommandListCount()const { - return m_commandListPointerToIndexMap.size(); + int retVal = 0; + for (auto iter = m_commandListInstancesVector.begin(); iter!= m_commandListInstancesVector.end(); iter++) + { + if (!(*iter).m_apiIndices.isEmpty()) + { + retVal++; + } + } + return retVal; } void gpTraceDataContainer::AddBakedCommandBuffer(VKGPUTraceInfo* pAPIInfo)