Include block IDs in debug log messages

Closes #183
This commit is contained in:
Adam Sawicki 2021-07-28 16:09:29 +02:00
parent 5ab5440732
commit 9ca6ecd2ae

View File

@ -11573,7 +11573,7 @@ VkResult VmaBlockVector::AllocatePage(
mapped,
(createInfo.flags & VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT) != 0);
VMA_HEAVY_ASSERT(pBestRequestBlock->Validate());
VMA_DEBUG_LOG(" Returned from existing block");
VMA_DEBUG_LOG(" Returned from existing block #%u", pBestRequestBlock->GetId());
(*pAllocation)->SetUserData(m_hAllocator, createInfo.pUserData);
m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), size);
if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
@ -11674,7 +11674,7 @@ void VmaBlockVector::Free(
// lock, for performance reason.
if(pBlockToDelete != VMA_NULL)
{
VMA_DEBUG_LOG(" Deleted empty block");
VMA_DEBUG_LOG(" Deleted empty block #%u", pBlockToDelete->GetId());
pBlockToDelete->Destroy(m_hAllocator);
vma_delete(m_hAllocator, pBlockToDelete);
}