| 10870 | } |
| 10871 | |
| 10872 | VkResult 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 | |
| 10889 | VkResult VmaDeviceMemoryBlock::BindImageMemory( |
| 10890 | VmaAllocator hAllocator, |
no test coverage detected