Skip to content
New issue

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

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

Already on GitHub? # to your account

Better validation and errors #1966

Merged
merged 2 commits into from
Sep 10, 2022
Merged

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Sep 8, 2022

After #1964 was merged I realised that there are still some shortcomings. This PR fixes those:

  • Ability to specify instance extensions, or API version only, for the bitflags and enum macros.
  • Ability to validate bitflags and enums with a physical device or an instance too.
  • Standardised error types across Vulkano for reporting that something is required from the instance/device but not available (RequirementNotMet), and standardised the wording of the messages.
  • Use a new RequiresOneOf struct type that can specify multiple possible requirements that may satisfy a requirement. This is useful for when extensions get promoted, and so there are multiple ways to get functionality.
  • Some random formatting/style changes.

This is all internal stuff, other than the error types, but changes to errors haven't been listed in the changelog for a while now anyway.

Copy link
Member

@AustinJ235 AustinJ235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like the RequiresOneOf type, great idea!

@AustinJ235 AustinJ235 merged commit b06b29a into vulkano-rs:master Sep 10, 2022
@Rua Rua deleted the better-validate branch September 17, 2022 11:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants