Switch to Vulkan-Hpp dynamic dispatch loader #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Not urgent. Volk isn't needed, because Vulkan-Hpp's dynamic dispatcher covers the same ground.
Current state
We use static dispatch: we link
Vulkan::Vulkanand call through the loader's trampolines. Debug-utils extension functions are fetched by hand withvkGetInstanceProcAddrin:engine/src/vulkan/instance.cpp(create/destroy debug messenger)engine/src/vulkan/device.cpp(same wrappers, duplicated)engine/src/vulkan/debug_label.cpp(vkCmdBeginDebugUtilsLabelEXT/vkCmdEndDebugUtilsLabelEXT)Proposal
Define
VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1and initialize the default dispatcher:Benefits
vkGetInstanceProcAddrwrappers. Extension functions get called directly, e.g.instance.createDebugUtilsMessengerEXT(...)andcmd.beginDebugUtilsLabelEXT(...).libvulkan.Work required
VMA_DYNAMIC_VULKAN_FUNCTIONSand passvkGetInstanceProcAddr/vkGetDeviceProcAddrthroughVmaVulkanFunctions.ImGui_ImplVulkan_LoadFunctions(or defineIMGUI_IMPL_VULKAN_NO_PROTOTYPES).vk*calls to Vulkan-Hpp, or route them through the dispatcher.