mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-22 15:04:34 +00:00
Fixed incorrect counting of m_BlocksFreeSize when merging margin blocks.
Code by @medranSolus
This commit is contained in:
parent
4b01ef07ef
commit
99d6fcb985
@ -10587,9 +10587,10 @@ void VmaBlockMetadata_TLSF::Free(VmaAllocHandle allocHandle)
|
|||||||
VkDeviceSize debugMargin = GetDebugMargin();
|
VkDeviceSize debugMargin = GetDebugMargin();
|
||||||
if (debugMargin > 0)
|
if (debugMargin > 0)
|
||||||
{
|
{
|
||||||
|
VMA_ASSERT(next->size == debugMargin);
|
||||||
// Adjust stats for one less block
|
// Adjust stats for one less block
|
||||||
--m_BlocksFreeCount;
|
--m_BlocksFreeCount;
|
||||||
m_BlocksFreeSize -= block->size;
|
m_BlocksFreeSize -= debugMargin;
|
||||||
MergeBlock(next, block);
|
MergeBlock(next, block);
|
||||||
block = next;
|
block = next;
|
||||||
next = next->nextPhysical;
|
next = next->nextPhysical;
|
||||||
|
Loading…
Reference in New Issue
Block a user