Degenerification part 2/3: Removal of lifetimes from wgpu-core#6099
Closed
Wumpf wants to merge 49 commits intogfx-rs:trunkfrom
Closed
Degenerification part 2/3: Removal of lifetimes from wgpu-core#6099Wumpf wants to merge 49 commits intogfx-rs:trunkfrom
wgpu-core#6099Wumpf wants to merge 49 commits intogfx-rs:trunkfrom
Conversation
This was referenced Aug 10, 2024
fd36733 to
9927994
Compare
nical
approved these changes
Aug 13, 2024
|
|
||
| These structures are responsible for keeping track of resource state, | ||
| generating barriers where needed, and making sure resources are kept | ||
| generating barriers where needednd making sure resources are kept |
Contributor
There was a problem hiding this comment.
nit: looks like the next few comment modifications are accidental.
Member
Author
There was a problem hiding this comment.
oops, one of my many regex replacements must have gone sideways!
cwfitzgerald
approved these changes
Aug 13, 2024
Member
cwfitzgerald
left a comment
There was a problem hiding this comment.
My eyes glazed over by the 457th file, but this is looking good and nothing that deserves blocking. I could probably find something to bikeshed if I really tried, but lets favor landing.
2f7294a to
5f6c8ba
Compare
…s buffer operations
…PassTimestampWrites usable with DynQuerySet
collateral: ComputePass uses DynCommandEncoder during recording
bindgroup fixup
…ffects from there leading to boxing of almost all hal resources
gfx_select macros are empty husks now that are waiting to be removed
5f6c8ba to
0fd56eb
Compare
Member
Author
|
merged in part 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
wgpu-halDynDevice& friends #6098wgpu-core#6099gfx_select, remove compute/render pass indirections #6100Description
This is where the magic happens!
Almost all interaction of
wgpu-halinwgpu-coreuse now the previously introducedDynbackend abstraction.To achieve this, all hal resources are allocated as
Box<dyn hal::DynResource>(with more concrete types for safety & easy of use).Since hal resource are no longer distinguish type,
Hubscollapses to just a singleHub.AnyDeviceis no longer needed since every device is just aBox<dyn hal::DynDevice>Since
wgpu-coretypes are extremely intertwined (most of them have anArc<Device>) this happens in very few commits. However, I split out a few rough iterations with two major "unravelings": first boxing & dyn passing, then hub simplification & actual generic removal.In order to not have this PR spill into
wgpu,gfx_selecthas been stripped down to pass-through, it will be removed entirely in Part 3.Testing
Checklist
cargo fmt.cargo clippy. If applicable, add:--target wasm32-unknown-unknown--target wasm32-unknown-emscriptencargo xtask testto run tests.[ ] Add change tochangelog in Part 3CHANGELOG.md. See simple instructions inside file.