Content stutters from `CommandEncoder` and `ComputePipeline` DOM object destruction in `Marching Cubes` example from official WebGPU samples
Categories
(Core :: Graphics: WebGPU, defect)
Tracking
()
People
(Reporter: ErichDonGubler, Assigned: teoxoy)
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•8 months ago
|
Reporter | ||
Comment 1•8 months ago
|
||
Originally found while re-triaging bug 1806659.
Reporter | ||
Comment 2•8 months ago
|
||
Made a profile here: https://share.firefox.dev/3ZP11Qy
Reporter | ||
Updated•8 months ago
|
Comment 3•4 months 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).
Assignee | ||
Comment 4•4 months ago
|
||
We do consume the content of command buffers on submit, so it's probably something else.
Comment 5•4 months 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.
Assignee | ||
Comment 6•3 months 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•3 months ago
|
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 7•2 months 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•2 months ago
|
Description
•