Reputation:
According to the vulkan sdk documentation under the subtopic "Application Interface to the Loader" the best performance way to setup Vulkan interface is
But I don't know how to actually implement this or if there is a library that already does this.
As a sidenote if I choose to use the loader library where is the list of all non-core non-wsi functions?
Upvotes: 2
Views: 2430
Reputation: 6797
You should use the loader, there's almost never a good reason not to. The easiest route is to link against the loader library, but if your app might need to run on systems that don't have a Vulkan driver installed (even if it only needs to run just enough to show an error message) then you should load the loader library dynamically.
Even when you're using the loader, you can get the same performance as if you didn't use it, by calling functions obtained via vkGetDeviceProcAddr. When you do that, you're calling directly into the driver, there is literally zero overhead from the loader.
All available extensions are in vulkan.h. Extension commands (functions) are sorted by the extension that provides them, so it's easy to tell which extension you need for a particular command. You can also look at the spec; each extension is listed in the appendix, with the list of structures and commands it adds.
Upvotes: 1
Reputation: 3447
Have a look at the first part of Intel's tutorial or code samples from the Vulkan Cookbook. They contain information about how to connect with Vulkan library and how to dynamically load function pointers.
As for the list of extensions - do You need all of them? Enabling all released instance and device extensions isn't probably a good idea because it drastically limits devices on which Your code will run. Just select extensions You need for Your project, enable them during instance and/or device creation and (if necessary) load their functions using the code available in the links provided above.
Upvotes: 1