From 5f94eae63ddebe32ef5aedc1b1e108de48139326 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Thu, 28 Nov 2019 11:52:30 +0100 Subject: [PATCH] Fix bug in VmaAllocator_T::AllocateVulkanMemory for case when HeapSizeLimit is used Closes #89 - thanks @JustSid ! --- src/vk_mem_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ VkResult VmaAllocator_T::AllocateVulkanMemory(const VkMemoryAllocateInfo* pAlloc { 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; }