MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / BindVulkanImage

Method BindVulkanImage

include/vk_mem_alloc.h:15129–15154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15127}
15128
15129VkResult VmaAllocator_T::BindVulkanImage(
15130 VkDeviceMemory memory,
15131 VkDeviceSize memoryOffset,
15132 VkImage image,
15133 const void* pNext) const
15134{
15135 if(pNext != VMA_NULL)
15136 {
15137#if VMA_VULKAN_VERSION >= 1001000 || VMA_BIND_MEMORY2
15138 if((m_UseKhrBindMemory2 || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) &&
15139 m_VulkanFunctions.vkBindImageMemory2KHR != VMA_NULL)
15140 {
15141 VkBindImageMemoryInfoKHR bindBufferMemoryInfo = { VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR };
15142 bindBufferMemoryInfo.pNext = pNext;
15143 bindBufferMemoryInfo.image = image;
15144 bindBufferMemoryInfo.memory = memory;
15145 bindBufferMemoryInfo.memoryOffset = memoryOffset;
15146 return (*m_VulkanFunctions.vkBindImageMemory2KHR)(m_hDevice, 1, &bindBufferMemoryInfo);
15147 }
15148#endif // #if VMA_BIND_MEMORY2
15149
15150 return VK_ERROR_EXTENSION_NOT_PRESENT;
15151 }
15152
15153 return (*m_VulkanFunctions.vkBindImageMemory)(m_hDevice, image, memory, memoryOffset);
15154}
15155
15156VkResult VmaAllocator_T::Map(VmaAllocation hAllocation, void** ppData)
15157{

Callers 1

BindImageMemoryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected