What are vk_bindings.h and vk_bindings_helper.h?

vk_bindings.h automatically generates pointers to functions which are dependent on the specific physical device used by the application

In Vulkan, each driver, device, or Vulkan installation on the developer’s system is represented as Vulkan objects. For example, there is the VkInstance, the VkPhysicalDevice, VkDisplay and others. The Vulkan API is used by calling vkXXXXXXX functions globally and passing the corresponding object - for example vkCreateBuffer(myVulkanDevice…).

The problem is that objects that belong to different physical devices (and their corresponding VkPhysicalDevice) need to dispatch to different functions. This is because they use different drivers to implement the functions. The Vulkan Loader (the vulkan-1.dll that is linked against) will need to do this dispatching, as the global function which is called is located in the loader. The loader must therefore determine which device it needs to be dispatched to and then call the appropriate function. It then also must return the result of the function call. This all causes a needless level of indirection.

The Vulkan-recommended way to tackle this is simple. Do not use the global functions for functions dispatched to a VkDevice – these are functions that get a VkDevice as their first parameter. Instead, get function pointers for the functions specific to that device, so that the dispatching can be skipped.

vk_bindings.h does exactly this. It is an auto-generated file that provides all the function pointer definitions and loading code to get per-instance and per-device function pointers.