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

fix: add missing deferred resource destruction in Global::poll_all_devices #5378

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Mar 11, 2024

Connections

Description
Describe what problem this is solving, and how it's solved.

#5216
While debugging Firefox's bug 1863872, @jimblandy and @nical discovered with @sotaroikeda's help that TextureViews appeared to be cleaned up far later than we expected. @nical had recently changed the path of clean-up for TextureViews with deferring until there was no lock contention. That PR added deferred resource clean-up to Global::device_poll, but, notably, not Global::poll_all_devices, which was certainly intended.

With this change, we can no longer reproduce bug 1863872, and we can confirm getting TextureView clean-up when we expect it again.

Testing

TODO: write testing

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.

@ErichDonGubler ErichDonGubler marked this pull request as ready for review March 12, 2024 14:33
@ErichDonGubler ErichDonGubler requested a review from a team as a code owner March 12, 2024 14:33
wgpu-core/src/device/global.rs Show resolved Hide resolved
wgpu-core/src/device/global.rs Show resolved Hide resolved
wgpu-core/src/device/global.rs Outdated Show resolved Hide resolved
@ErichDonGubler ErichDonGubler enabled auto-merge (rebase) March 12, 2024 14:47
@ErichDonGubler ErichDonGubler merged commit 6040820 into gfx-rs:trunk Mar 12, 2024
27 checks passed
@ErichDonGubler ErichDonGubler deleted the missing-deferred-destruction branch March 12, 2024 14:54
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