[vello_hybrid] A single encoder with too many commands can permanently stall (Metal backend)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Context
This issue is split out from another broader performance investigation regarding Vello Hybrid. If Vello Hybrid has a lot of work to do, and pushes a lot of work onto the `CommandEncoder`, it is possible to permanently stall depending on the wgpu graphics backend.
### Repro
Run a very expensive scene (e.g. the complex compositing/mixing scene), on a large monitor using the Metal graphics backend. The scene will never render. Using `lldb` to inspect the process yields:
```
frame #3: 0x00000001a3b8c90c Metal`-[_MTLCommandBuffer initWithQueue:retainedReferences:synchronousDebugMode:] + 188
```
We get the same diagnostics as https://github.com/gfx-rs/wgpu/issues/1960.
As a quick validation, I wrote a proof-of-concept where Vello Hybrid owns the `CommandEncoder` and periodically flushes it. With this change the stall no longer reproduces.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the complex compositing/mixing scene with the Metal graphics backend on a large monitor and inspect the Vello Hybrid CommandEncoder ownership. Use the referenced wgpu diagnostics and the proof-of-concept periodic flush as investigation points. Done means the expensive scene renders without permanently stalling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100