https://webgpu.github.io/webgpu-samples/samples/imageBlur takes a long time to compile shaders
Categories
(Core :: Graphics: WebGPU, defect)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs, )
Details
Attachments
(1 file)
43.48 KB,
text/plain
|
Details |
Go to https://webgpu.github.io/webgpu-samples/samples/imageBlur
AR: https://share.firefox.dev/3urFgJY (profile wihtWebgpu preset logging)
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
This happens with/without dx12-no-readback , and with all 3 canvas backends (d2d, gpu, skia)
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•1 years ago
•
|
||
I'm going to change the scope of this bug to include whatever is needed to make this specific page work, since AFAIK nothing is tracking it yet. There's at least two issues at play here:
- Shader compilation (specifically, D3D's optimization passes over shader code) appears to be the source of the hang/freeze—at least on Windows—with the vast majority of the paused time being in
third_party/rust/wgpu-hal/src/dx12/shader_compilation.rs
:38's call toD3DCompile
. This takes ~15 seconds on my personal workstation. Nuts! - I also see some shaders failing on bug 1878320.
Linking against 1806659, which serves as a meta-bug for WebGPU's official samples.
Updated•1 years ago
|
Comment 4•1 years ago
|
||
Aha, perf. issues are definitely the newly filed bug 1885217. 😭👍🏻
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Bug 1878449, comment 5 is applicable here; perf. issues are fundamental to any shader compilation that is long (which even the best shader compiler might not be able to prevent). The solution is offered by the spec. in the form of GPUDevice.createComputePipelineAsync
.
Comment 6•8 months ago
|
||
With recent fixes in WebGPU, this page now successfully loads for me, but the long shader compilation delay is still present because we're using FXC for compilation.
Updated•8 months ago
|
Reporter | ||
Comment 7•7 months ago
|
||
Latest profile: https://share.firefox.dev/42xPfft
Working as expected.
Description
•