[deno] Associate external memory with each command encoder on Metal #8704
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.
This encourages doing garbage collection before the command buffer limit is reached.
This change is complementary to #8574. That change will change deadlocks into device loss, in any environment where wgpu runs. This change avoids reaching the limit, only in Deno.
I made the change specific to Metal, and not specific to cts_runner. I don't have strong feelings about either of those things, i.e., I'd also be fine doing it on all platforms, and I'd be fine adding a
cts_runnerfeature so that we can do this only in cts_runner and not in other contexts where Deno runs.Connections
Related to #3084.
Testing
Tested locally that this resolves some CTS suites that were hanging. However, both suites still have failing tests, so can't be run as a single selector in CI.
I also got a hang in CI on #8699 that I suspect is this issue, I will confirm that #8699 can run the CTS reliably with this fix.
Squash or Rebase? Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.