From 9ca6ecd2aeb905472a9c314a37c038261c973a8f Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Wed, 28 Jul 2021 16:09:29 +0200 Subject: [PATCH] Include block IDs in debug log messages Closes #183 --- include/vk_mem_alloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index ddbc0c8..27564fc 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -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); }