KhronosGroup / KhronosGroup/Vulkan-Docs

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

Open
#2,551 0 comments 0 reactions 1 assignee Assigned to @r-potter View on GitHub
Feature Request
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

## 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](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#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](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.