VulkanMemoryAllocator
VulkanMemoryAllocator copied to clipboard
vkGetPhysicalDeviceMemoryProperties2KHR not found
I have a feeling that even on vulkan >= 1.1, sometimes
vkGetPhysicalDeviceMemoryProperties2KHR is not found by the loader, unless the VK_KHR_get_physical_device_properties2 is enabled.
maybe could be a good idea to fallback to the "non"-khr version if the pointer is not found?
I'm using vma with #define VMA_STATIC_VULKAN_FUNCTIONS 0 #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
I pass instance and device pointers that I obtain from the vulkan-hpp dynamic dispatcher.
Sorry, I think this might be a duplicate of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/410
I think the underlying cause is a bug in the Nvidia driver implementation for linux.
Currently, function ImportVulkanFunctions_Dynamic fetches this function pointer:
- From
"vkGetPhysicalDeviceMemoryProperties2"if Vulkan version >= 1.1. - Else, from
"vkGetPhysicalDeviceMemoryProperties2KHR"if VK_KHR_get_physical_device_properties2 extension is enabled.
Which I think matches the Vulkan spec. How do you propose to change this logic to make it more robust against this driver bug?
EDIT: I'm talking nonsense, that can't work :)
I could check if in the broken driver implementation it could work by falling back if we get a nullptr back.
I pushed some changes, always trying to load the function pointer from both "vkGetPhysicalDeviceMemoryProperties2" or "vkGetPhysicalDeviceMemoryProperties2KHR" names. Please let me know if it helps.