Fixed bug in VmaDefragmentationContext_T::ComputeDefragmentation_Extensive
Fixes #328. Code by @medranSolus.
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 @@
{
// Full clear performed already
if (prevMoveCount != m_Moves.size() && freeMetadata->GetNextAllocation(handle) == VK_NULL_HANDLE)
- reinterpret_cast<size_t*>(m_AlgorithmState)[index] = last;
+ vectorState.firstFreeBlock = last;
return true;
}
}