Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkGetPhysicalDeviceMemoryProperties2KHR not found #455

Open
FilippoLeon opened this issue Dec 24, 2024 · 4 comments
Open

vkGetPhysicalDeviceMemoryProperties2KHR not found #455

FilippoLeon opened this issue Dec 24, 2024 · 4 comments
Labels
compatibility Compatibility with some platforms input needed Waiting for more information

Comments

@FilippoLeon
Copy link

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.

@FilippoLeon
Copy link
Author

Sorry, I think this might be a duplicate of #410

I think the underlying cause is a bug in the Nvidia driver implementation for linux.

@adam-sawicki-a
Copy link
Contributor

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?

@adam-sawicki-a adam-sawicki-a added compatibility Compatibility with some platforms input needed Waiting for more information labels Jan 15, 2025
@FilippoLeon
Copy link
Author

FilippoLeon commented Jan 15, 2025

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.

@adam-sawicki-a
Copy link
Contributor

I pushed some changes, always trying to load the function pointer from both "vkGetPhysicalDeviceMemoryProperties2" or "vkGetPhysicalDeviceMemoryProperties2KHR" names. Please let me know if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with some platforms input needed Waiting for more information
Projects
None yet
Development

No branches or pull requests

2 participants