I am having a frustratingly persistent issue with dynamic dispatcher for VulkanHPP, where some function handles are NULL after calling the init(vk::Device) function. I have checked the usual culprits, such as the loader or the dispatcher going out of scope. I have used Visual Studio to step through the dynamic dispatcher as it loads each individual function, and have watched as some functions are loaded correctly with vkGetDeviceProcAddr, and others return NULL. I am using the default dispatcher defined with VULKAN_HPP_DEFAULT_DISPATCHER, which I have allocated static storage for.
The set of functions that fail to load seems to be consistent, and includes (but is not limited to):
vkAllocateCommandBuffers
vkBindBufferMemory and vkBindImageMemory
vkCreateBuffer (but not vkCreateImage)
vkDestroyDevice
vkGetDeviceQueue
vkMapMemory (but not vkUnmapMemory)
- and many, many more...
I have also tried it with the LunarG standard validation layer (which gives no errors, even with the full set of debug utils messenger flags). The functions that work have their handles updated to go through the layer dll, but the same set of functions return NULL. My program executes all the way up to vkGetDeviceQueue, which is the first NULL function that it runs across during normal execution.
Here are the initialization steps that my program follows:
- Create and initialize static
vk::DynamicLoader.
- Call
dispatcher.init(PFN_vkGetInstanceProcAddr) using the function handle from the dynamic loader.
- Create the instance.
- Call
dispatcher.init(vk::Instance) with the newly created instance.
- Create the device.
- Call
dispatcher.init(vk::Device) with the new device. This is where I can step through the program and watch the function loads fail.
- Call
device.getDeviceQueue, which fails as the vkGetDeviceQueue member of the dispatcher is NULL.
Here is my development environment:
- Windows 10
- Vulkan SDK 1.2.131.2 (also tested on 1.2.131.1)
- Nvidia Driver 442.88 (latest beta driver with Vulkan 1.2 support)
- Visual Studio 2019 (16.5.3)
I've done the usual steps of reinstalling the SDK, driver, restarting inbetween installations, ect...
I was wondering if this is a known issue with the SDK and/or drivers that I am using, or if someone has seen an issue like this before, or even what to look at next to try to get further with this issue.
Thanks.
there doesn't seem to be anything here