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

[wgpu-core] pass resources as Arcs when adding them to the registry #5499

Merged
merged 4 commits into from
Apr 6, 2024

Conversation

lylythechosenone
Copy link
Contributor

Connections
Fixes #5493
Linked to #5124

Description
Currently, Registry takes resources to insert by value. This is incompatible with dynamic-sized resources, which are the next step in #5124. This change instead takes resources already in their Arcs, and uses .get_mut() to modify them in place.

Testing
No testing currently, but this is largely just a refactor. I'm not sure we need testing for it.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@lylythechosenone lylythechosenone requested a review from a team as a code owner April 5, 2024 14:55
@lylythechosenone
Copy link
Contributor Author

@nical wait, there are errors on wasm and Windows. Just fixed Windows and will push in a second, but I think we need to discuss the wasm one.

@lylythechosenone
Copy link
Contributor Author

FIxed now.

@nical nical merged commit d814851 into gfx-rs:trunk Apr 6, 2024
27 checks passed
@lylythechosenone lylythechosenone deleted the 5493-pass-resources-as-arcs branch April 6, 2024 14: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.

Pass resources as Arcs when adding them to the registry
2 participants