Content stutters from `CommandEncoder` and `ComputePipeline` DOM object destruction in `Marching Cubes` example from official WebGPU samples
Categories
(Core :: Graphics: WebGPU, defect, P1)
Tracking
()
People
(Reporter: ErichDonGubler, Unassigned)
References
(Blocks 1 open bug, )
Details
Steps to reproduce
- Open https://webgpu.github.io/webgpu-samples/?sample=marchingCubes. Observe that while the demo runs, occasional stutter on the order of a hundred milliseconds occurs, interrupting multiple render frames.
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Comment 1•1 year ago
|
||
Originally found while re-triaging bug 1806659.
| Reporter | ||
Comment 2•1 year ago
|
||
Made a profile here: https://share.firefox.dev/3ZP11Qy
| Reporter | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
FYI we had a similar issue in Chromium on GC because many GPUCommandBuffers get released at once, which all have O(commands) cost to that. The solution was to eagerly destroy them after submit (they are consumed even if the submit is an error for that reason IIRC).
Comment 4•1 year ago
|
||
We do consume the content of command buffers on submit, so it's probably something else.
Comment 5•1 year ago
|
||
IIRC Firefox uses content-side tracking of objects used by the command buffers. So even if the command buffers are consumed on submit on the GPU process side, if they aren't on the content-process, it could cause stutters.
Comment 6•1 year ago
|
||
Good point, we do hold references to objects https://searchfox.org/mozilla-central/rev/04a2c5317c0af560ed1689304498416c9c6c485a/dom/webgpu/RenderPassEncoder.h#56-60 that we don't clear on encoder.end().
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•1 year ago
|
||
With the shader cache https://github.com/gfx-rs/wgpu/pull/7729 the sample runs a lot smoother with occasional hitches due to GC, see https://share.firefox.dev/3FubZUh.
Based on the new profile I don't think this needs to be blocked on Bug 1968122 anymore.
Updated•1 year ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Description
•