Closed Bug 1878449 Opened 2 years ago Closed 7 months ago

Browser UI freezes if you try to profile-and-capture a WebGPU demo with D2d-Canvas enabled

Categories

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

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

Attachments

(1 file)

Use latest nightly on Windows (d2d-canvas, webgpu)
Start the profiler (recording phase)
Go to https://vectorgameexperts.github.io/bevy-vello/
Capture the profile

AR: The whole browser freezes with CPU use
ER: Not so

It feels as if d2d-canvas doesnt like to let go of the browser UI when another canvas-y tab wants to...

If I disable d2d-canvas, i can atleast capture the profile : https://share.firefox.dev/48ZrxsM / https://share.firefox.dev/3UrqnBL / https://share.firefox.dev/3OqBrLG

This bug Could be a dupe of bug 1872858

Summary: Profioing-and-capturing the WebGPU demo (with D2d-canvas ) freezes the browser UI → Profiling-and-capturing the WebGPU demo (with D2d-canvas ) freezes the browser UI
See Also: → 1872858
Summary: Profiling-and-capturing the WebGPU demo (with D2d-canvas ) freezes the browser UI → Browser UI freezes if you try to profile-and-capture a WebGPU demo with D2d-Canvas enabled
Severity: -- → S3

The profiles show that these are 3-30+s shader compiles within wgpu.
Whole-browser freeze on mundane content is probably S2.

Flags: needinfo?(jgilbert)
Severity: S3 → S2
See Also: → 1880415

95% confident that this is because of webgpu-fxc.

Channeling :bhood's energy here, downgrading this defect to S3, since WebGPU isn't "shipped" yet.

Severity: S2 → S3
Depends on: webgpu-fxc
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(jimb)
No longer blocks: gfx-triage
Priority: -- → P2

Marking this P2 per WebGPU priorities, "Correct use of important WebGPU gives wrong results".

If this is indeed FXC, perhaps we could move shader compilation off the main thread.

Demoting this to P5.

WebGPU best practice is to use createRenderPipelineAsync and createComputePipelineAsync, rather than their synchronous counterparts createRenderPipeline and createComputePipeline, specifically to avoid this kind of jank. Without major changes, it is difficult to make the synchronous versions avoid blocking all subsequent work.

In the long term we may want to move away from FXC altogether, because its worst-case compile times are very bad, and not as rare as one would hope.

Priority: P2 → P5

We have bug 1885217 filed for getting rid of FXC.

The page/browser do no freeze anymore. So the original bug is fixed.
Profile: https://share.firefox.dev/3WkL16P
However, the demo doesnt render. Attaching the errorlog.
Should this bug be closed, or can it be repurposed?

Flags: needinfo?(nical.bugzilla)
Attached file error log

Thanks for testing this Mayank. I think that we should open a new bug for the correctness issue. I'll close this one.

Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(nical.bugzilla)
Resolution: --- → FIXED

(In reply to Nicolas Silva [:nical] from comment #9)

Thanks for testing this Mayank. I think that we should open a new bug for the correctness issue. I'll close this one.

The demo doesnt run on Chrome too. This looks to be a website bug for now.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: