MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / FreePages

Method FreePages

include/vk_mem_alloc.h:7369–7385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7367}
7368
7369void VmaBlockBufferImageGranularity::FreePages(VkDeviceSize offset, VkDeviceSize size)
7370{
7371 if (!IsEnabled())
7372 return;
7373
7374 uint32_t startPage = GetStartPage(offset);
7375 --m_RegionInfo[startPage].allocCount;
7376 if (m_RegionInfo[startPage].allocCount == 0)
7377 m_RegionInfo[startPage].allocType = VMA_SUBALLOCATION_TYPE_FREE;
7378 uint32_t endPage = GetEndPage(offset, size);
7379 if (startPage != endPage)
7380 {
7381 --m_RegionInfo[endPage].allocCount;
7382 if (m_RegionInfo[endPage].allocCount == 0)
7383 m_RegionInfo[endPage].allocType = VMA_SUBALLOCATION_TYPE_FREE;
7384 }
7385}
7386
7387void VmaBlockBufferImageGranularity::Clear()
7388{

Callers 1

FreeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected