mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Fixed VmaBlockVector::MakePoolAllocationsLost (thanks @kennyalive! #18)
This commit is contained in:
parent
defbf3d975
commit
4cefd614dc
@ -6382,12 +6382,16 @@ void VmaBlockVector::MakePoolAllocationsLost(
|
|||||||
size_t* pLostAllocationCount)
|
size_t* pLostAllocationCount)
|
||||||
{
|
{
|
||||||
VmaMutexLock lock(m_Mutex, m_hAllocator->m_UseMutex);
|
VmaMutexLock lock(m_Mutex, m_hAllocator->m_UseMutex);
|
||||||
|
size_t lostAllocationCount = 0;
|
||||||
for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
|
for(uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex)
|
||||||
{
|
{
|
||||||
VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
|
VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex];
|
||||||
VMA_ASSERT(pBlock);
|
VMA_ASSERT(pBlock);
|
||||||
pBlock->m_Metadata.MakeAllocationsLost(currentFrameIndex, m_FrameInUseCount);
|
lostAllocationCount += pBlock->m_Metadata.MakeAllocationsLost(currentFrameIndex, m_FrameInUseCount);
|
||||||
|
}
|
||||||
|
if(pLostAllocationCount != VMA_NULL)
|
||||||
|
{
|
||||||
|
*pLostAllocationCount = lostAllocationCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user