Avoid leaking submitted command encoders#5141
Avoid leaking submitted command encoders#5141cwfitzgerald merged 3 commits intogfx-rs:trunkfrom nical:cmdbug-leak
Conversation
|
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,wgpuconsumes command buffers during submit so it needs to drop themChecklist
cargo fmt.cargo clippy.cargo xtask testto run tests.CHANGELOG.md. See simple instructions inside file.