Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it required to call gladLoaderLoadVulkan one more time with VK_EXT_debug_utils? #367

Closed
yehuohan opened this issue May 26, 2022 · 2 comments

Comments

@yehuohan
Copy link

When VK_EXT_debug_utils is enabled and we want to call vkCreateDebugUtilsMessengerEXT before physical device is created, it is seemed required one more call gladLoaderLoadVulkan(instance, NULL, NULL). (Getting address of vkCreateDebugUtilsMessengerEXT only need a valid instance)

So with the builtin loader it would be like this:

gladLoaderLoadVulkan(NULL, NULL, NULL);
gladLoaderLoadVulkan(instance, NULL, NULL);
gladLoaderLoadVulkan(instance, phyiscal_device, NULL);
gladLoaderLoadVulkan(instance, phyiscal_device, device);

Is it right?

@Dav1dde
Copy link
Owner

Dav1dde commented May 26, 2022

This sounds correct. The first call resolves all global functions like vkCreateInstance, the second one all instance functions (including the one youre interested in) the 3rd one to populate all device extensions, the fourth one to reload all device functions (optional see here).

Are you having any issues with this? Maybe the triangle example can help you as a rough reference (does only reload 3 times not 4).

@yehuohan
Copy link
Author

I think the issue I caught had beed addressed. And very thank to the example that helped me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants