mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-14 16:58:34 +00:00
More coding and more tests. Basic functionality is working now.
This commit is contained in:
parent
dc644281ac
commit
e1812303d6
2 changed files with 32 additions and 26 deletions
|
@ -6860,10 +6860,7 @@ public:
|
|||
const VkAllocationCallbacks m_AllocationCallbacks;
|
||||
|
||||
VmaVirtualBlock_T(const VmaVirtualBlockCreateInfo& createInfo);
|
||||
~VmaVirtualBlock_T()
|
||||
{
|
||||
vma_delete(GetAllocationCallbacks(), m_Metadata);
|
||||
}
|
||||
~VmaVirtualBlock_T();
|
||||
VkResult Init()
|
||||
{
|
||||
return VK_SUCCESS;
|
||||
|
@ -16665,6 +16662,15 @@ VmaVirtualBlock_T::VmaVirtualBlock_T(const VmaVirtualBlockCreateInfo& createInfo
|
|||
m_Metadata->Init(createInfo.size);
|
||||
}
|
||||
|
||||
VmaVirtualBlock_T::~VmaVirtualBlock_T()
|
||||
{
|
||||
// This is an important assert!!!
|
||||
// Hitting it means you have some memory leak - unreleased virtual allocations.
|
||||
VMA_ASSERT(m_Metadata->IsEmpty() && "Some virtual allocations were not freed before destruction of this virtual block!");
|
||||
|
||||
vma_delete(GetAllocationCallbacks(), m_Metadata);
|
||||
}
|
||||
|
||||
VkResult VmaVirtualBlock_T::Allocate(const VmaVirtualAllocationCreateInfo& createInfo, VkDeviceSize& outOffset)
|
||||
{
|
||||
outOffset = VK_WHOLE_SIZE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue