| 11210 | } |
| 11211 | |
| 11212 | VkResult VmaDeviceMemoryBlock::BindImageMemory( |
| 11213 | VmaAllocator hAllocator, |
| 11214 | VmaAllocation hAllocation, |
| 11215 | VkDeviceSize allocationLocalOffset, |
| 11216 | VkImage hImage, |
| 11217 | const void* pNext) |
| 11218 | { |
| 11219 | VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK && |
| 11220 | hAllocation->GetBlock() == this); |
| 11221 | VMA_ASSERT(allocationLocalOffset < hAllocation->GetSize() && |
| 11222 | "Invalid allocationLocalOffset. Did you forget that this offset is relative to the beginning of the allocation, not the whole memory block?"); |
| 11223 | const VkDeviceSize memoryOffset = hAllocation->GetOffset() + allocationLocalOffset; |
| 11224 | // This lock is important so that we don't call vkBind... and/or vkMap... simultaneously on the same VkDeviceMemory from multiple threads. |
| 11225 | VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); |
| 11226 | return hAllocator->BindVulkanImage(m_hMemory, memoryOffset, hImage, pNext); |
| 11227 | } |
| 11228 | |
| 11229 | #if VMA_EXTERNAL_MEMORY_WIN32 |
| 11230 | VkResult VmaDeviceMemoryBlock::CreateWin32Handle(const VmaAllocator hAllocator, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE hTargetProcess, HANDLE* pHandle) noexcept |
no test coverage detected