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

Refactor DescriptorRequirements #2081

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Nov 5, 2022

Changelog:

### Breaking changes
Changes to `DescriptorRequirements`:
- The struct has been split into two levels: the per-binding `DescriptorBindingRequirements`, and the per-descriptor-index `DescriptorRequirements`.
- The `descriptor_requirements` method of various types has been renamed to `descriptor_binding_requirements` to match.
- `DescriptorBindingRequirements` has a single `descriptors` member instead of multiple `HashSet` members. This member is a `HashMap` with `Option<u32>` as the key type. The key `None` holds requirements for non-constant indices, while requirements for constant indices are stored as `Some`.
- Validation checks against the requirements, and pipeline barriers, now always include the requirements of the `None` key as well. This may result in false positives, but prevents false negatives.
- `DescriptorRequirements` now has `memory_read` and `memory_write` members, which hold a `ShaderStages` value for the stages which read or write the resource. This is used for more fine-grained pipeline barriers.

Not much to say here, it's pretty much in the changelog already.

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.

Looks good

@AustinJ235 AustinJ235 merged commit 4ccfc92 into vulkano-rs:master Nov 9, 2022
AustinJ235 added a commit that referenced this pull request Nov 9, 2022
@Rua Rua deleted the descriptor-requirements branch December 6, 2022 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants