@@ -161,21 +161,18 @@ ProfileSessionDataItem* gpTraceDataContainer::AddDX12APIItem(DX12APIInfo* pAPIIn
161161 // Add the item to the thread's root
162162 AddItemToThread (pRetVal);
163163
164- if (pAPIInfo->m_sampleId > 0 )
165- {
166- m_sampleIdToCPUItemMap.insertMulti (pAPIInfo->m_sampleId , pRetVal);
167- }
168-
169164 // Add the item to the session items map
170165 m_sessionItemsSortedByStartTime.insertMulti (pRetVal->StartTime (), pRetVal);
171166
172167 // Initialize the container API type
173168 m_sessionAPIType = ProfileSessionDataItem::DX12_API_PROFILE_ITEM;
174169
175- // If this call has a sample id, add it to the list of calls
170+ // If this call has a sample id, add it to the list of calls and to the map of CPU - GPU ids
176171 if (pAPIInfo->m_sampleId > 0 )
177172 {
178173 m_commandListUnAttachedCalls << pRetVal;
174+ m_sampleIdToCPUItemMap.insertMulti (pAPIInfo->m_sampleId , pRetVal);
175+
179176 }
180177
181178 // Analyze the command list close API call
@@ -260,6 +257,7 @@ ProfileSessionDataItem* gpTraceDataContainer::AddVKAPIItem(VKAPIInfo* pAPIInfo)
260257 if (pAPIInfo->m_sampleId > 0 )
261258 {
262259 m_commandListUnAttachedCalls << pRetVal;
260+ m_sampleIdToCPUItemMap.insertMulti (pAPIInfo->m_sampleId , pRetVal);
263261 }
264262
265263 // Analyze the command list close API call
@@ -310,6 +308,10 @@ ProfileSessionDataItem* gpTraceDataContainer::AddVKGPUTraceItem(VKGPUTraceInfo*
310308 QString commandListInstanceName = AddGPUCallToCommandList (pAPIInfo);
311309 pRetVal->SetColumnData (ProfileSessionDataItem::SESSION_ITEM_COMMAND_LIST_COLUMN, commandListInstanceName);
312310
311+ if (pAPIInfo->m_sampleId > 0 )
312+ {
313+ m_sampleIdToGPUItemMap.insertMulti (pAPIInfo->m_sampleId , pRetVal);
314+ }
313315 }
314316 }
315317
0 commit comments