KhronosGroup / Vulkan-Hpp

Open-Source Vulkan C++ API
Apache License 2.0
3.1k stars 306 forks source link

API subset generation #1611

Open t-artikov opened 1 year ago

t-artikov commented 1 year ago

While Vulkan (with extensions) contains a vast number of features, usually only a fraction of them are used in a particular project. I suggest adding the ability to specify the API version and a list of extensions for VulkanHppGenerator. For example: ./VulkanHppGenerator -api-version 1.1 -extensions VK_KHR_swapchain,VK_EXT_debug_utils The resulting header files will only contain the specified functionality.

This offers the following benefits:

asuessenbach commented 1 year ago

That's an interesting approach for those who regularly build their vulkan.hpp on their own, instead of just using what's provided by the Vulkan SDK. Of course, when specifying an api-version, all versions up to that version would be generated. And when specifying an extension, all extensions (and potentially versions) that extension depends on would be generated as well.

But I think, this would be approached with low priority: