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

Clean up render bundle bind group tracking. #2679

Closed

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented May 21, 2022

In wgpu_core::command::bundle::BindState, the dynamic_offsets and is_dirty flags only make sense when the slot is occupied, so they should be inside the Option. Doing so makes State::bind into an ArrayVec<Option<BindState>>, and cleans up various other bits.

Document some parts of wgpu_core's render bundle code.

jimblandy added 2 commits May 20, 2022 23:23
The `dynamic_offsets` and `is_dirty` flags only make sense when the
slot is occupied, so they should be inside the `Option`. This makes
`State::bind` into an `ArrayVec<Option<BindState>>`, and cleans up
various other bits.
@jimblandy jimblandy force-pushed the render-bundle-binding-cleanup branch from 8709a22 to f80f9af Compare May 21, 2022 08:52
@jimblandy
Copy link
Member Author

Err, with this change bind becomes an ArrayVec<Option<BindState>>. That was kind of the whole point. PR description and commit message fixed.

Note, by the way, that a doc commit is split out from the code changes, for easier review.

@kvark
Copy link
Member

kvark commented May 22, 2022

Merged in #2684

@kvark kvark closed this May 22, 2022
@jimblandy jimblandy deleted the render-bundle-binding-cleanup branch May 22, 2022 16:00
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.

2 participants