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

Method BindImageMemory

include/vk_mem_alloc.h:10889–10904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10887}
10888
10889VkResult VmaDeviceMemoryBlock::BindImageMemory(
10890 VmaAllocator hAllocator,
10891 VmaAllocation hAllocation,
10892 VkDeviceSize allocationLocalOffset,
10893 VkImage hImage,
10894 const void* pNext)
10895{
10896 VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK &&
10897 hAllocation->GetBlock() == this);
10898 VMA_ASSERT(allocationLocalOffset < hAllocation->GetSize() &&
10899 "Invalid allocationLocalOffset. Did you forget that this offset is relative to the beginning of the allocation, not the whole memory block?");
10900 const VkDeviceSize memoryOffset = hAllocation->GetOffset() + allocationLocalOffset;
10901 // This lock is important so that we don't call vkBind... and/or vkMap... simultaneously on the same VkDeviceMemory from multiple threads.
10902 VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex);
10903 return hAllocator->BindVulkanImage(m_hMemory, memoryOffset, hImage, pNext);
10904}
10905
10906#if VMA_EXTERNAL_MEMORY_WIN32
10907VkResult VmaDeviceMemoryBlock::CreateWin32Handle(const VmaAllocator hAllocator, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, HANDLE hTargetProcess, HANDLE* pHandle) noexcept

Callers 2

vmaCreateImageFunction · 0.80
vmaCreateAliasingImage2Function · 0.80

Calls 6

GetOffsetMethod · 0.80
BindVulkanImageMethod · 0.80
GetMemoryMethod · 0.80
GetTypeMethod · 0.45
GetBlockMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected