Fix bug in VmaAllocator_T::AllocateVulkanMemory for case when HeapSizeLimit is used

Closes #89 - thanks @JustSid !
This commit is contained in:
Adam Sawicki 2019-11-28 11:52:30 +01:00
parent 023976ad24
commit 5f94eae63d

View File

@ -15857,7 +15857,7 @@ VkResult VmaAllocator_T::AllocateVulkanMemory(const VkMemoryAllocateInfo* pAlloc
{ {
return VK_ERROR_OUT_OF_DEVICE_MEMORY; return VK_ERROR_OUT_OF_DEVICE_MEMORY;
} }
if(m_Budget.m_BlockBytes->compare_exchange_strong(blockBytes, blockBytesAfterAllocation)) if(m_Budget.m_BlockBytes[heapIndex].compare_exchange_strong(blockBytes, blockBytesAfterAllocation))
{ {
break; break;
} }