Lines Matching refs:hAllocation
5142 VmaAllocation hAllocation; member
5254 VmaAllocation hAllocation) = 0;
5273 VmaAllocation hAllocation) const;
5337 VmaAllocation hAllocation);
5518 VmaAllocation hAllocation);
5628 VmaAllocation hAllocation);
5768 const VmaAllocation hAllocation,
5772 const VmaAllocation hAllocation,
5856 VmaAllocation hAllocation);
6675 void GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo);
6676 bool TouchAllocation(VmaAllocation hAllocation);
6696 VkResult Map(VmaAllocation hAllocation, void** ppData);
6697 void Unmap(VmaAllocation hAllocation);
6699 VkResult BindBufferMemory(VmaAllocation hAllocation, VkBuffer hBuffer);
6700 VkResult BindImageMemory(VmaAllocation hAllocation, VkImage hImage);
6703 VmaAllocation hAllocation,
6707 void FillAllocation(const VmaAllocation hAllocation, uint8_t pattern);
7592 VmaAllocation hAllocation) const in PrintDetailedMap_Allocation() argument
7599 hAllocation->PrintParameters(json); in PrintDetailedMap_Allocation()
7657 suballoc.hAllocation = VK_NULL_HANDLE; in Init()
7695 VMA_VALIDATE(currFree == (subAlloc.hAllocation == VK_NULL_HANDLE)); in Validate()
7711 VMA_VALIDATE(subAlloc.hAllocation->GetOffset() == subAlloc.offset); in Validate()
7712 VMA_VALIDATE(subAlloc.hAllocation->GetSize() == subAlloc.size); in Validate()
7830 PrintDetailedMap_Allocation(json, suballocItem->offset, suballocItem->hAllocation); in PrintDetailedMap()
7962 suballocIt->hAllocation->CanBecomeLost()) in CreateAllocationRequest()
8010 VMA_ASSERT(pAllocationRequest->item->hAllocation != VK_NULL_HANDLE); in MakeRequestedAllocationsLost()
8011 VMA_ASSERT(pAllocationRequest->item->hAllocation->CanBecomeLost()); in MakeRequestedAllocationsLost()
8012 if(pAllocationRequest->item->hAllocation->MakeLost(currentFrameIndex, frameInUseCount)) in MakeRequestedAllocationsLost()
8038 it->hAllocation->CanBecomeLost() && in MakeAllocationsLost()
8039 it->hAllocation->MakeLost(currentFrameIndex, frameInUseCount)) in MakeAllocationsLost()
8077 VmaAllocation hAllocation) in Alloc() argument
8097 suballoc.hAllocation = hAllocation; in Alloc()
8145 if(suballoc.hAllocation == allocation) in Free()
8179 if(suballoc.hAllocation == alloc) in ResizeAllocation()
8209 newFreeSuballoc.hAllocation = VK_NULL_HANDLE; in ResizeAllocation()
8224 newFreeSuballoc.hAllocation = VK_NULL_HANDLE; in ResizeAllocation()
8344 if(suballocItem->hAllocation->CanBecomeLost() && in CheckAllocation()
8345 … suballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex) in CheckAllocation()
8441 VMA_ASSERT(lastSuballocItem->hAllocation != VK_NULL_HANDLE); in CheckAllocation()
8442 if(lastSuballocItem->hAllocation->CanBecomeLost() && in CheckAllocation()
8443 … lastSuballocItem->hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex) in CheckAllocation()
8471 VMA_ASSERT(nextSuballoc.hAllocation != VK_NULL_HANDLE); in CheckAllocation()
8472 if(nextSuballoc.hAllocation->CanBecomeLost() && in CheckAllocation()
8473 … nextSuballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex) in CheckAllocation()
8607 suballoc.hAllocation = VK_NULL_HANDLE; in FreeSuballocation()
8730 minAlignment = VMA_MIN(minAlignment, it->hAllocation->GetAlignment()); in IsBufferImageGranularityConflictPossible()
8781 VMA_VALIDATE(suballocations1st[m_1stNullItemsBeginCount].hAllocation != VK_NULL_HANDLE); in Validate()
8783 VMA_VALIDATE(suballocations1st.back().hAllocation != VK_NULL_HANDLE); in Validate()
8788 VMA_VALIDATE(suballocations2nd.back().hAllocation != VK_NULL_HANDLE); in Validate()
8807 VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE)); in Validate()
8812 VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset); in Validate()
8813 VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size); in Validate()
8831 suballoc.hAllocation == VK_NULL_HANDLE); in Validate()
8841 VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE)); in Validate()
8847 VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset); in Validate()
8848 VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size); in Validate()
8869 VMA_VALIDATE(currFree == (suballoc.hAllocation == VK_NULL_HANDLE)); in Validate()
8874 VMA_VALIDATE(suballoc.hAllocation->GetOffset() == suballoc.offset); in Validate()
8875 VMA_VALIDATE(suballoc.hAllocation->GetSize() == suballoc.size); in Validate()
8992 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in CalcAllocationStatInfo()
9049 suballocations1st[nextAlloc1stIndex].hAllocation == VK_NULL_HANDLE) in CalcAllocationStatInfo()
9105 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in CalcAllocationStatInfo()
9178 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in AddPoolStats()
9231 suballocations1st[nextAlloc1stIndex].hAllocation == VK_NULL_HANDLE) in AddPoolStats()
9283 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in AddPoolStats()
9355 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9404 suballocations1st[nextAlloc1stIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9451 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9506 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9526 PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.hAllocation); in PrintDetailedMap()
9553 suballocations1st[nextAlloc1stIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9573 PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.hAllocation); in PrintDetailedMap()
9601 suballocations2nd[nextAlloc2ndIndex].hAllocation == VK_NULL_HANDLE) in PrintDetailedMap()
9621 PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.hAllocation); in PrintDetailedMap()
9928 VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE); in CreateAllocationRequest()
9929 if(suballoc.hAllocation->CanBecomeLost() && in CreateAllocationRequest()
9930 … suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex) in CreateAllocationRequest()
9952 if(suballoc.hAllocation != VK_NULL_HANDLE) in CreateAllocationRequest()
9955 if(suballoc.hAllocation->CanBecomeLost() && in CreateAllocationRequest()
9956 … suballoc.hAllocation->GetLastUseFrameIndex() + frameInUseCount < currentFrameIndex) in CreateAllocationRequest()
10041 VMA_ASSERT(suballoc.hAllocation != VK_NULL_HANDLE); in MakeRequestedAllocationsLost()
10042 VMA_ASSERT(suballoc.hAllocation->CanBecomeLost()); in MakeRequestedAllocationsLost()
10043 if(suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount)) in MakeRequestedAllocationsLost()
10046 suballoc.hAllocation = VK_NULL_HANDLE; in MakeRequestedAllocationsLost()
10074 suballoc.hAllocation->CanBecomeLost() && in MakeAllocationsLost()
10075 suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount)) in MakeAllocationsLost()
10078 suballoc.hAllocation = VK_NULL_HANDLE; in MakeAllocationsLost()
10090 suballoc.hAllocation->CanBecomeLost() && in MakeAllocationsLost()
10091 suballoc.hAllocation->MakeLost(currentFrameIndex, frameInUseCount)) in MakeAllocationsLost()
10094 suballoc.hAllocation = VK_NULL_HANDLE; in MakeAllocationsLost()
10156 VmaAllocation hAllocation) in Alloc() argument
10158 const VmaSuballocation newSuballoc = { request.offset, allocSize, hAllocation, type }; in Alloc()
10238 firstSuballoc.hAllocation = VK_NULL_HANDLE; in FreeAtOffset()
10284 it->hAllocation = VK_NULL_HANDLE; in FreeAtOffset()
10304 it->hAllocation = VK_NULL_HANDLE; in FreeAtOffset()
10344 suballocations1st[m_1stNullItemsBeginCount].hAllocation == VK_NULL_HANDLE) in CleanupAfterFree()
10352 suballocations1st.back().hAllocation == VK_NULL_HANDLE) in CleanupAfterFree()
10360 suballocations2nd.back().hAllocation == VK_NULL_HANDLE) in CleanupAfterFree()
10372 while(suballocations1st[srcIndex].hAllocation == VK_NULL_HANDLE) in CleanupAfterFree()
10405 suballocations2nd[m_1stNullItemsBeginCount].hAllocation == VK_NULL_HANDLE) in CleanupAfterFree()
10665 VmaAllocation hAllocation) in Alloc() argument
10728 currNode->allocation.alloc = hAllocation; in Alloc()
11177 const VmaAllocation hAllocation, in BindBufferMemory() argument
11180 VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK && in BindBufferMemory()
11181 hAllocation->GetBlock() == this); in BindBufferMemory()
11188 hAllocation->GetOffset()); in BindBufferMemory()
11193 const VmaAllocation hAllocation, in BindImageMemory() argument
11196 VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK && in BindImageMemory()
11197 hAllocation->GetBlock() == this); in BindImageMemory()
11204 hAllocation->GetOffset()); in BindImageMemory()
11763 VmaAllocation hAllocation) in Free() argument
11771 VmaDeviceMemoryBlock* pBlock = hAllocation->GetBlock(); in Free()
11775 … pBlock->ValidateMagicValueAroundAllocation(m_hAllocator, hAllocation->GetOffset(), hAllocation->G… in Free()
11779 if(hAllocation->IsPersistentMap()) in Free()
11784 pBlock->m_pMetadata->Free(hAllocation); in Free()
12718 AllocationInfo allocInfo = AllocationInfo(it->hAllocation, VMA_NULL); in Defragment()
12840 VmaAllocation_T* const pAlloc = srcSuballocIt->hAllocation; in Defragment()
12871 suballoc.hAllocation->ChangeOffset(dstAllocOffset); in Defragment()
12897 … suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pFreeSpaceBlock, dstAllocOffset); in Defragment()
12961 srcSuballocIt->hAllocation->ChangeOffset(dstAllocOffset); in Defragment()
12983 … suballoc.hAllocation->ChangeBlockAllocation(m_hAllocator, pDstBlock, dstAllocOffset); in Defragment()
14880 void VmaAllocator_T::GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInf… in GetAllocationInfo() argument
14882 if(hAllocation->CanBecomeLost()) in GetAllocationInfo()
14889 uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex(); in GetAllocationInfo()
14897 pAllocationInfo->size = hAllocation->GetSize(); in GetAllocationInfo()
14899 pAllocationInfo->pUserData = hAllocation->GetUserData(); in GetAllocationInfo()
14904 pAllocationInfo->memoryType = hAllocation->GetMemoryTypeIndex(); in GetAllocationInfo()
14905 pAllocationInfo->deviceMemory = hAllocation->GetMemory(); in GetAllocationInfo()
14906 pAllocationInfo->offset = hAllocation->GetOffset(); in GetAllocationInfo()
14907 pAllocationInfo->size = hAllocation->GetSize(); in GetAllocationInfo()
14909 pAllocationInfo->pUserData = hAllocation->GetUserData(); in GetAllocationInfo()
14914 … if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex)) in GetAllocationInfo()
14925 uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex(); in GetAllocationInfo()
14935 … if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex)) in GetAllocationInfo()
14943 pAllocationInfo->memoryType = hAllocation->GetMemoryTypeIndex(); in GetAllocationInfo()
14944 pAllocationInfo->deviceMemory = hAllocation->GetMemory(); in GetAllocationInfo()
14945 pAllocationInfo->offset = hAllocation->GetOffset(); in GetAllocationInfo()
14946 pAllocationInfo->size = hAllocation->GetSize(); in GetAllocationInfo()
14947 pAllocationInfo->pMappedData = hAllocation->GetMappedData(); in GetAllocationInfo()
14948 pAllocationInfo->pUserData = hAllocation->GetUserData(); in GetAllocationInfo()
14952 bool VmaAllocator_T::TouchAllocation(VmaAllocation hAllocation) in TouchAllocation() argument
14955 if(hAllocation->CanBecomeLost()) in TouchAllocation()
14958 uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex(); in TouchAllocation()
14971 … if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex)) in TouchAllocation()
14982 uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex(); in TouchAllocation()
14992 … if(hAllocation->CompareExchangeLastUseFrameIndex(localLastUseFrameIndex, localCurrFrameIndex)) in TouchAllocation()
15184 VkResult VmaAllocator_T::Map(VmaAllocation hAllocation, void** ppData) in Map() argument
15186 if(hAllocation->CanBecomeLost()) in Map()
15191 switch(hAllocation->GetType()) in Map()
15195 VmaDeviceMemoryBlock* const pBlock = hAllocation->GetBlock(); in Map()
15200 *ppData = pBytes + (ptrdiff_t)hAllocation->GetOffset(); in Map()
15201 hAllocation->BlockAllocMap(); in Map()
15206 return hAllocation->DedicatedAllocMap(this, ppData); in Map()
15213 void VmaAllocator_T::Unmap(VmaAllocation hAllocation) in Unmap() argument
15215 switch(hAllocation->GetType()) in Unmap()
15219 VmaDeviceMemoryBlock* const pBlock = hAllocation->GetBlock(); in Unmap()
15220 hAllocation->BlockAllocUnmap(); in Unmap()
15225 hAllocation->DedicatedAllocUnmap(this); in Unmap()
15232 VkResult VmaAllocator_T::BindBufferMemory(VmaAllocation hAllocation, VkBuffer hBuffer) in BindBufferMemory() argument
15235 switch(hAllocation->GetType()) in BindBufferMemory()
15241 hAllocation->GetMemory(), in BindBufferMemory()
15246 VmaDeviceMemoryBlock* pBlock = hAllocation->GetBlock(); in BindBufferMemory()
15248 res = pBlock->BindBufferMemory(this, hAllocation, hBuffer); in BindBufferMemory()
15257 VkResult VmaAllocator_T::BindImageMemory(VmaAllocation hAllocation, VkImage hImage) in BindImageMemory() argument
15260 switch(hAllocation->GetType()) in BindImageMemory()
15266 hAllocation->GetMemory(), in BindImageMemory()
15271 VmaDeviceMemoryBlock* pBlock = hAllocation->GetBlock(); in BindImageMemory()
15273 res = pBlock->BindImageMemory(this, hAllocation, hImage); in BindImageMemory()
15283 VmaAllocation hAllocation, in FlushOrInvalidateAllocation() argument
15287 const uint32_t memTypeIndex = hAllocation->GetMemoryTypeIndex(); in FlushOrInvalidateAllocation()
15290 const VkDeviceSize allocationSize = hAllocation->GetSize(); in FlushOrInvalidateAllocation()
15296 memRange.memory = hAllocation->GetMemory(); in FlushOrInvalidateAllocation()
15298 switch(hAllocation->GetType()) in FlushOrInvalidateAllocation()
15330 const VkDeviceSize allocationOffset = hAllocation->GetOffset(); in FlushOrInvalidateAllocation()
15332 const VkDeviceSize blockSize = hAllocation->GetBlock()->m_pMetadata->GetSize(); in FlushOrInvalidateAllocation()
15388 void VmaAllocator_T::FillAllocation(const VmaAllocation hAllocation, uint8_t pattern) in FillAllocation() argument
15391 !hAllocation->CanBecomeLost() && in FillAllocation()
15392 …(m_MemProps.memoryTypes[hAllocation->GetMemoryTypeIndex()].propertyFlags & VK_MEMORY_PROPERTY_HOST… in FillAllocation()
15395 VkResult res = Map(hAllocation, &pData); in FillAllocation()
15398 memset(pData, (int)pattern, (size_t)hAllocation->GetSize()); in FillAllocation()
15399 FlushOrInvalidateAllocation(hAllocation, 0, VK_WHOLE_SIZE, VMA_CACHE_FLUSH); in FillAllocation()
15400 Unmap(hAllocation); in FillAllocation()