Skip to content

[Roadmap Feedback] Remove the need to manually enable extension/feature #2551

@Cyphall

Description

@Cyphall

Problem statement:

Vulkan requires that all features and/or extensions that an application expects to use need to be enabled at instance/device creation.

Use Case Example:

An application may wish to share its Vulkan objects with external libraries.
Both the application and the libraries have their own requirements regarding the required features they want to use.

This requires performing a complicated and very error-prone merge of all of the features/extensions.
Keep in mind that there are multiple ways to enable a certain feature (extension string, extension-specific feature struct, versioned feature struct, etc.).

On top of that, this makes it pretty-much impossible to "turn on" a library on-demand, because this often requires recreating the whole VkDevice in the middle of the lifetime of the app (which very few applications with bother to implement).

A good example of this problem is OpenXR's Vulkan integration:

  • XR_KHR_vulkan_enable give to the application the list of extensions to enable that are required by the runtime, but this is not enough because extensions often need their associated feature(s) to be enabled.
  • XR_KHR_vulkan_enable2 on the other hand forces the app to hand over the instance and device creation to the runtime so that required features can correctly be enabled, but:
    • The complicated extension/feature merging is done by the runtime and may break in case of new Vulkan versions, and we can't do anything about it.
    • What if another library/framework uses the same system and also needs to handle instance/device creation?

Also, an OpenXR runtime change requires recreating the instance and device, which basically means an application restart.

Suggested Solution:

Make it so all supported features and extensions are always enabled as in other graphics APIs (except robust accesses, whose enablement could be handled via other means).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions