From 0e37526f9452b1399d22005af9d37d0d2df370db Mon Sep 17 00:00:00 2001
From: Adam Sawicki <adam.sawicki@amd.com>
Date: Fri, 29 Oct 2021 16:37:58 +0200
Subject: [PATCH] Implemented VmaBlockMetadata_Linear::Clear

A step towards enabling virtual allocator with linear algorithm.
---
 include/vk_mem_alloc.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h
index 9201e10..f87b3d8 100644
--- a/include/vk_mem_alloc.h
+++ b/include/vk_mem_alloc.h
@@ -10524,7 +10524,14 @@ void VmaBlockMetadata_Linear::GetAllocationInfo(VkDeviceSize offset, VmaVirtualA
 
 void VmaBlockMetadata_Linear::Clear()
 {
-    VMA_ASSERT(0 && "TODO implement");
+    m_SumFreeSize = GetSize();
+    m_Suballocations0.clear();
+    m_Suballocations1.clear();
+    m_1stVectorIndex = 0;
+    m_2ndVectorMode = SECOND_VECTOR_EMPTY;
+    m_1stNullItemsBeginCount = 0;
+    m_1stNullItemsMiddleCount = 0;
+    m_2ndNullItemsCount = 0;
 }
 
 void VmaBlockMetadata_Linear::SetAllocationUserData(VkDeviceSize offset, void* userData)