-
Notifications
You must be signed in to change notification settings - Fork 920
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
Avoid leaking submitted command encoders #5141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
It breaks the multithreaded_compute test. |
I suspect that the error is that multithreaded_compute is racing to create command buffers in the same slot:
|
What's happening is:
So we have to ensure that the |
Unfortunately, trying to keep an Arc to the resource in the Destroyed variant of the registry causes We could put the |
Another solution that doesn't require as much refactoring is to make command buffers snatchable. We probably should not use the |
@nical with the other things you landed by now, has the situation changed much on how to fix this? Snatchability out of the registry makes the most sense to me since this best represents what should be happening (the queue submissing takes over the lifetime of the actual resource, from a hub perspective it's already dead), but then again I'm not 100% sure I've been following correctly |
I'm note sure, this is completely paged out of my brain. I'll try to rebase it and see if it breaks. |
* Avoid leaking submitted command encoders * changelog
* Avoid leaking submitted command encoders * changelog
* Avoid leaking submitted command encoders * changelog
For tracking purposes: This was unblocked by #5244. |
Connections
Part of #4660 got accidentally clobbered by arcanization
Description
unlike
wgpu-core
,wgpu
consumes command buffers during submit so it needs to drop themChecklist
cargo fmt
.cargo clippy
.cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.