| 15127 | } |
| 15128 | |
| 15129 | VkResult 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 | |
| 15156 | VkResult VmaAllocator_T::Map(VmaAllocation hAllocation, void** ppData) |
| 15157 | { |