Skip to content

Commit b6fb84e

Browse files
Fixes in importing of vkGetPhysicalDeviceMemoryProperties2[KHR] function
Related to #410
1 parent f1ab507 commit b6fb84e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/vk_mem_alloc.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,7 @@ typedef struct VmaVulkanFunctions
10081008
PFN_vkBindImageMemory2KHR VMA_NULLABLE vkBindImageMemory2KHR;
10091009
#endif
10101010
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
1011+
/// Fetch from "vkGetPhysicalDeviceMemoryProperties2" on Vulkan >= 1.1, but you can also fetch it from "vkGetPhysicalDeviceMemoryProperties2KHR" if you enabled extension VK_KHR_get_physical_device_properties2.
10111012
PFN_vkGetPhysicalDeviceMemoryProperties2KHR VMA_NULLABLE vkGetPhysicalDeviceMemoryProperties2KHR;
10121013
#endif
10131014
#if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000
@@ -12861,7 +12862,7 @@ void VmaAllocator_T::ImportVulkanFunctions_Static()
1286112862
}
1286212863
#endif
1286312864

12864-
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
12865+
#if VMA_VULKAN_VERSION >= 1001000
1286512866
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
1286612867
{
1286712868
m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2)vkGetPhysicalDeviceMemoryProperties2;
@@ -12977,11 +12978,11 @@ void VmaAllocator_T::ImportVulkanFunctions_Dynamic()
1297712978
#if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000
1297812979
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
1297912980
{
12980-
VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2, "vkGetPhysicalDeviceMemoryProperties2");
12981+
VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2");
1298112982
}
1298212983
else if(m_UseExtMemoryBudget)
1298312984
{
12984-
VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2, "vkGetPhysicalDeviceMemoryProperties2KHR");
12985+
VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2KHR");
1298512986
}
1298612987
#endif
1298712988

0 commit comments

Comments
 (0)