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

Method BindBufferMemory

include/vk_mem_alloc.h:10872–10887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10870}
10871
10872VkResult VmaDeviceMemoryBlock::BindBufferMemory(
10873 VmaAllocator hAllocator,
10874 VmaAllocation hAllocation,
10875 VkDeviceSize allocationLocalOffset,
10876 VkBuffer hBuffer,
10877 const void* pNext)
10878{
10879 VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK &&
10880 hAllocation->GetBlock() == this);
10881 VMA_ASSERT(allocationLocalOffset < hAllocation->GetSize() &&
10882 "Invalid allocationLocalOffset. Did you forget that this offset is relative to the beginning of the allocation, not the whole memory block?");
10883 const VkDeviceSize memoryOffset = hAllocation->GetOffset() + allocationLocalOffset;
10884 // This lock is important so that we don't call vkBind... and/or vkMap... simultaneously on the same VkDeviceMemory from multiple threads.
10885 VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex);
10886 return hAllocator->BindVulkanBuffer(m_hMemory, memoryOffset, hBuffer, pNext);
10887}
10888
10889VkResult VmaDeviceMemoryBlock::BindImageMemory(
10890 VmaAllocator hAllocator,

Callers 3

vmaCreateBufferFunction · 0.80
vmaCreateAliasingBuffer2Function · 0.80

Calls 6

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

Tested by

no test coverage detected