Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enable_features_if_present to PhysicalDevice #273

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

charles-lunarg
Copy link
Owner

Allows users to enable features if they are present, getting back a bool telling them whether the feature is supported and will be enabled on the device.

Fixes #269

@charles-lunarg
Copy link
Owner Author

Todo:

  • Prevent users from adding VkPhysicalDeviceFeatures2 to templated functions, since it'll break
  • Document that it only enables features, extensions must be manually enabled as well.

src/VkBootstrap.cpp Outdated Show resolved Hide resolved
add_required_extension_features takes a reference now, but the docs
indicated it took a pointer.
This allows the set_required_features_11/12/13 to take a reference instead
of a value. Applications should set the sType, vk-bootstrap shouldn't be
doing that for apps.
@charles-lunarg charles-lunarg force-pushed the allow_enabling_optional_features branch 2 times, most recently from ad41fec to 3e57bee Compare April 26, 2024 20:43
Allows users to enable features if they are present, getting back a bool
telling them whether the feature is supported and will be enabled on the
device.

Also:
* Removes redundant VkPhysicalDeviceFeatures2 struct in vkb::PhysicalDevice.
* Adds test copying of details when creating a VkDevice so that test can check
what features were actually enabled on the device.
* Creates GenericFeatureChain struct for managing pNext chains.
* Allow multiple calls to set_require_features by combining the fields
@charles-lunarg
Copy link
Owner Author

I'm going to go ahead and merge - additional features can always be added later.

@charles-lunarg charles-lunarg merged commit c9d9428 into main Apr 26, 2024
16 checks passed
@charles-lunarg charles-lunarg deleted the allow_enabling_optional_features branch April 26, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants