Hey I'm trying to create a Windows Surface with Vulkan
but the somehow vkGetInstanceProcAddr
fails to load the vkCreateWin32SurfaceKHR
function even though the extension is loaded properly.
Edit: here I try to get the function pointer:
vkCreateWin32SurfaceKHR =
(PFN_vkCreateWin32SurfaceKHR)vkGetInstanceProcAddr(vulkanInstance.instance,
"vkCreateWin32SurfaceKHR");
Did you enable the appropriate extension using e.g. the const VK_KHR_WIN32_SURFACE_EXTENSION_NAME
at instance creation time?
Also note that you don't need to manually get the function pointer for vkCreateWin32SurfaceKHR
unless you define VK_NO_PROTOTYPES
as it's part of the core.
If you have enabled the extension and still don't get a valid function pointer, check if your drivers are properly installed, esp. that there is no old ICD registered that may cause problems. The LunarG Vulkan SDK contains a tool called "via" (in the bin folder) to check your Vulkan installation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With