Delete AMD action callbacks if multiple passes happen. Closes #2958

This commit is contained in:
baldurk
2023-06-15 11:25:57 +01:00
parent 7f8e14fb65
commit 082402ed66
+7
View File
@@ -456,6 +456,8 @@ void VulkanReplay::FillTimersAMD(uint32_t *eventStartID, uint32_t *sampleIndex,
{
uint32_t maxEID = m_pDriver->GetMaxEID();
RDCASSERT(m_pAMDActionCallback == NULL);
m_pAMDActionCallback = new VulkanAMDActionCallback(m_pDriver, this, *sampleIndex, *eventIDs);
// replay the events to perform all the queries
@@ -502,8 +504,13 @@ rdcarray<CounterResult> VulkanReplay::FetchCountersAMD(const rdcarray<GPUCounter
eventIDs.clear();
// delete any callback from a previous pass, we only use it for EID aliasing
SAFE_DELETE(m_pAMDActionCallback);
FillTimersAMD(&eventStartID, &sampleIndex, &eventIDs);
// leave this one alive, it will be deleted below
m_pAMDCounters->EndPass();
}