0

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:

  1. My installation of vulkan passes all tests for integrity and validity.
  2. My graphics card supports vulkan(and all the features necessary to run the debug vulkan functions) and is up-to-date with drivers.
  3. I did the previous step of setting up VkInstanceCreateInfo.ppEnabledExtensionsNames with VK_EXT_DEBUG_REPORT_EXTENSION_NAME
  4. 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?

1 Answer 1

2

Its not VK_EXT_DEBUG_REPORT_EXTENSION_NAME that you have to set up, its : VK_EXT_DEBUG_UTILS_EXTENSION_NAME . Also be sure that your vulkan sdk installation is in excellent condition, also your drivers must be up-to-date. Try restarting your computer after doing these last two things I mentioned just to be safe .

1
  • Someone please let me know if I should delete the whole question know, it seems like a silly mistake of mine the whole thing! Commented Jul 25, 2020 at 1:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.