MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / InitBlockAllocation

Method InitBlockAllocation

include/vk_mem_alloc.h:10939–10962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10937}
10938
10939void VmaAllocation_T::InitBlockAllocation(
10940 VmaDeviceMemoryBlock* block,
10941 VmaAllocHandle allocHandle,
10942 VkDeviceSize alignment,
10943 VkDeviceSize size,
10944 uint32_t memoryTypeIndex,
10945 VmaSuballocationType suballocationType,
10946 bool mapped)
10947{
10948 VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);
10949 VMA_ASSERT(block != VMA_NULL);
10950 m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK;
10951 m_Alignment = alignment;
10952 m_Size = size;
10953 m_MemoryTypeIndex = memoryTypeIndex;
10954 if(mapped)
10955 {
10956 VMA_ASSERT(IsMappingAllowed() && "Mapping is not allowed on this allocation! Please use one of the new VMA_ALLOCATION_CREATE_HOST_ACCESS_* flags when creating it.");
10957 m_Flags |= (uint8_t)FLAG_PERSISTENT_MAP;
10958 }
10959 m_SuballocationType = (uint8_t)suballocationType;
10960 m_BlockAllocation.m_Block = block;
10961 m_BlockAllocation.m_AllocHandle = allocHandle;
10962}
10963
10964void VmaAllocation_T::InitDedicatedAllocation(
10965 VmaAllocator allocator,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected