Record and replay: Added support for function vmaMakePoolAllocationsLost.
This commit is contained in:
parent
5de71e1d28
commit
2556b377f7
3 changed files with 66 additions and 0 deletions
|
@ -4854,6 +4854,8 @@ public:
|
|||
VmaAllocation allocation);
|
||||
void RecordGetAllocationInfo(uint32_t frameIndex,
|
||||
VmaAllocation allocation);
|
||||
void RecordMakePoolAllocationsLost(uint32_t frameIndex,
|
||||
VmaPool pool);
|
||||
|
||||
private:
|
||||
struct CallParams
|
||||
|
@ -8507,6 +8509,18 @@ void VmaRecorder::RecordGetAllocationInfo(uint32_t frameIndex,
|
|||
Flush();
|
||||
}
|
||||
|
||||
void VmaRecorder::RecordMakePoolAllocationsLost(uint32_t frameIndex,
|
||||
VmaPool pool)
|
||||
{
|
||||
CallParams callParams;
|
||||
GetBasicParams(callParams);
|
||||
|
||||
VmaMutexLock lock(m_FileMutex, m_UseMutex);
|
||||
fprintf(m_File, "%u,%.3f,%u,vmaMakePoolAllocationsLost,%p\n", callParams.threadId, callParams.time, frameIndex,
|
||||
pool);
|
||||
Flush();
|
||||
}
|
||||
|
||||
VmaRecorder::UserDataString::UserDataString(VmaAllocationCreateFlags allocFlags, const void* pUserData)
|
||||
{
|
||||
if(pUserData != VMA_NULL)
|
||||
|
@ -10401,6 +10415,13 @@ void vmaMakePoolAllocationsLost(
|
|||
|
||||
VMA_DEBUG_GLOBAL_MUTEX_LOCK
|
||||
|
||||
#if VMA_RECORDING_ENABLED
|
||||
if(allocator->GetRecorder() != VMA_NULL)
|
||||
{
|
||||
allocator->GetRecorder()->RecordMakePoolAllocationsLost(allocator->GetCurrentFrameIndex(), pool);
|
||||
}
|
||||
#endif
|
||||
|
||||
allocator->MakePoolAllocationsLost(pool, pLostAllocationCount);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue