Reputation: 4915
In Vulkan, while creating a vkInstance
or a vkDevice
all extensions that will be used must be specified to be enabled during instance/device creation. Similarly, all physical device features required must be specified while creating a vkDevice
. So my question is, is there any real reason against simply enabling all availble extensions/features, similarly to how in OpenGL all extensions/features are always enabled and the application simply queries for their support? By this I mean using all extensions returned by vkEnumerateInstanceExtensionProperties
, vkEnumerateDeviceExtensionProperties
and similar.
I ask because I think that enabling all available extensions/features is simpler than using a different approach and I am wondering if it is inferior, for example causes some performance overhead, to enabling only required (or optionally used) features/extesions.
Upvotes: 1
Views: 1926
Reputation: 13246
Firstly, you are not allowed to enable certain combination of features and extensions..
Secondly, even just enabling a feature can incur some kind of an overhad. Notably, you do not want all those robust image\buffer features enabled.
Upvotes: 3
Reputation: 67380
enabling all available extensions/features is simpler than using a different approach
What different approach? You still need to test if the extension exists before actually using the function pointer to it, don't you?
is there any real reason against simply enabling all availble extensions/features, similarly to [...] OpenGL
The whole purpose of using Vulkan is that you get fine control over every single detail of interfacing with your GPU. From extensions to whether or not to create a depth buffer, to explicit multi-threaded & multi-device synchronization, it's up to you to use exactly what you need and nothing more.
Nothing is stopping you from using OpenGL if you prefer an easier journey, especially if you won't go the extra mile (or 10 miles, as it were). It's much easier to write performant applications in OpenGL than it is to write even moderately performant Vulkan applications.
Upvotes: 3