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

Method DedicatedAllocUnmap

include/vk_mem_alloc.h:11504–11524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11502}
11503
11504void VmaAllocation_T::DedicatedAllocUnmap(VmaAllocator hAllocator)
11505{
11506 VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED);
11507
11508 if (m_MapCount > 0)
11509 {
11510 --m_MapCount;
11511 if (m_MapCount == 0 && !IsPersistentMap())
11512 {
11513 VMA_ASSERT(m_DedicatedAllocation.m_ExtraData != VMA_NULL);
11514 m_DedicatedAllocation.m_ExtraData->m_pMappedData = VMA_NULL;
11515 (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(
11516 hAllocator->m_hDevice,
11517 m_DedicatedAllocation.m_hMemory);
11518 }
11519 }
11520 else
11521 {
11522 VMA_ASSERT(0 && "Unmapping dedicated allocation not previously mapped.");
11523 }
11524}
11525
11526#if VMA_STATS_STRING_ENABLED
11527void VmaAllocation_T::PrintParameters(class VmaJsonWriter& json) const

Callers 1

UnmapMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected