Fix bug in VmaAllocator_T::AllocateVulkanMemory for case when HeapSizeLimit is used
Closes #89 - thanks @JustSid !
diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h
index c06144d..8678a22 100644
--- a/src/vk_mem_alloc.h
+++ b/src/vk_mem_alloc.h
@@ -15857,7 +15857,7 @@
{
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;
}