Open Bug 1675311 Opened 5 years ago Updated 1 year ago

Compute pass, render pass, and bundle recording may be slow

Categories

(Core :: Graphics: WebGPU, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: kvark, Unassigned)

References

(Blocks 1 open bug)

Details

In https://phabricator.services.mozilla.com/D94908 we start to serialize compute/render pass contents with bincode. It would be nice to do that on the fly as the passes are recorded (in wgpu) instead of doing it in two stages. This may or may not be a problem - we'll need to see how heavy this copy is in the profiles.

To clarify, this is what our pass command recording does currently for dispatches: https://searchfox.org/mozilla-central/rev/a23e65c5d69a821f61d14c8ec1f69a120e3f77d1/gfx/wgpu/wgpu-core/src/command/compute.rs#605
When recording a pass, we are appending to the list of commands. The question here is whether we can just send these commands to bincode right away. That would require changes to wgpu-core.

Blocks: webgpu-v1
Priority: -- → P3
Blocks: webgpu-phase-2
No longer blocks: webgpu-v1
Severity: S3 → --
Priority: P3 → P1
Summary: Bincode WebGPU pass commands as they are recorded → WebGPU command buffers should hold resources weakly

This has been done for render passes and compute passes, but we still need to do this for render bundles.

Severity: -- → S3
Priority: P1 → P5
Summary: WebGPU command buffers should hold resources weakly → Compute pass, render pass, and bundle recording may be slow
No longer blocks: webgpu-triage
You need to log in before you can comment on or make changes to this bug.