From a79d2746f157558c4d8ff10c378feeaa4ab06ca8 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Fri, 21 Sep 2018 13:26:12 +0200 Subject: [PATCH] Added dummy implementation of VmaBlockMetadata_Buddy methods related to lost allocations. Lost allocations are not supported in buddy algorithm for now. --- src/vk_mem_alloc.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index 2f55b66..ee3b8dc 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -9366,12 +9366,20 @@ bool VmaBlockMetadata_Buddy::MakeRequestedAllocationsLost( uint32_t frameInUseCount, VmaAllocationRequest* pAllocationRequest) { - return false; // TODO + /* + Lost allocations are not supported in buddy allocator at the moment. + Support might be added in the future. + */ + return pAllocationRequest->itemsToMakeLostCount == 0; } uint32_t VmaBlockMetadata_Buddy::MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) { - return 0; // TODO + /* + Lost allocations are not supported in buddy allocator at the moment. + Support might be added in the future. + */ + return 0; } void VmaBlockMetadata_Buddy::Alloc(