From ff37e9278616b79ee36c9e102c9345ed155f9354 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Fri, 7 Apr 2023 10:58:24 +0200 Subject: [PATCH] Fixed bug in VmaDefragmentationContext_T::ComputeDefragmentation_Extensive Fixes #328. Code by @medranSolus. --- include/vk_mem_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 9b7aa62..823cef8 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -13732,7 +13732,7 @@ bool VmaDefragmentationContext_T::ComputeDefragmentation_Extensive(VmaBlockVecto { // Full clear performed already if (prevMoveCount != m_Moves.size() && freeMetadata->GetNextAllocation(handle) == VK_NULL_HANDLE) - reinterpret_cast(m_AlgorithmState)[index] = last; + vectorState.firstFreeBlock = last; return true; } }