| 10937 | } |
| 10938 | |
| 10939 | void 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 | |
| 10964 | void VmaAllocation_T::InitDedicatedAllocation( |
| 10965 | VmaAllocator allocator, |
no outgoing calls
no test coverage detected