From a1895bc76547370564d604faa27e0b73de747df1 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Tue, 8 Feb 2022 16:31:11 +0100 Subject: [PATCH] Internal fix in VmaBlockVector::AllocatePage --- include/vk_mem_alloc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 40ad1ad..0d01d51 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -12252,7 +12252,8 @@ VkResult VmaBlockVector::AllocatePage( freeMemory = (heapBudget.usage < heapBudget.budget) ? (heapBudget.budget - heapBudget.usage) : 0; } - const bool canFallbackToDedicated = !IsCustomPool(); + const bool canFallbackToDedicated = !HasExplicitBlockSize() && + (createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0; const bool canCreateNewBlock = ((createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0) && (m_Blocks.size() < m_MaxBlockCount) &&