CONTEXT: Im using a gtx 760 with up-to-date drivers, windows 10 and the latest version of vulkan. Im currently following this part of the tutorial on their main page(Vulkan`s): https://vulkan-tutorial.com/en/Drawing_a_triangle/Setup/Validation_layers
the tutorial makes use of GLFW for the window creation(used in my code) and a linear algebra math library that is not used in my code.
the code:
VkResult CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT*
pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pDebugMessenger) {
auto func = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT");
if (func != nullptr) {
return func(instance, pCreateInfo, pAllocator, pDebugMessenger);
}
else {
std::cerr << "error extension not present"<<std::endl;
return VK_ERROR_EXTENSION_NOT_PRESENT;
}
}
I get the else branch where "error extension not present" is printed. I did set up VK_EXT_DEBUG_REPORT_EXTENSION_NAME in the VkInstanceCreateInfo.ppEnabledExtensionsNames . Heres my full code if you think its necessary to review/test it: https://github.com/quartuxz/VulcanDoesntWork
(yes I know the repository uses "vulcan" instead of "vulkan", my bad; thats how new I am with it)
The question is then why does the loading of a function address fail when:
- My installation of vulkan passes all tests for integrity and validity.
- My graphics card supports vulkan(and all the features necessary to run the debug vulkan functions) and is up-to-date with drivers.
- I did the previous step of setting up VkInstanceCreateInfo.ppEnabledExtensionsNames with VK_EXT_DEBUG_REPORT_EXTENSION_NAME
- I did every other step of the tutorial right, at least that is what I hope.
Did vulkan change the way this specific part of it works? is there an alternative to this function? Why cant I load the address of this function?