Open Bug 1885217 (webgpu-fxc) Opened 10 months ago Updated 10 days ago

WebGPU: shader compilation with FXC is slow, broken, and abandoned

Categories

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

defect

Tracking

()

People

(Reporter: ErichDonGubler, Unassigned)

References

(Blocks 10 open bugs, )

Details

Firefox currently uses Microsoft's FXC by default for its DX12 back end. FXC is a legacy component that has multiple significant issues:

  • First and foremost, FXC is slow, easily taking over 10 seconds to compile relatively simple shaders.
  • FXC is incorrect; it has some shader compilation bugs that have no roadmap for resolution.

We need to overcome both of these issues in order to have an objectively good experience with shader compilation in our implementation of WebGPU.

Possible solutions we know of so far:

  • Microsoft's DirectX Shader Compiler (AKA "DXC") is a successor to FXC that fixes these issues. We could consume it, and thereby resolve the above problems.
  • Another approach might be to write a compilation backend for Firefox's shader transpiler (Naga) for DXIL (DXC's new intermediate representation), so we can emit it directly (viz., wgpu#4155).

:jgilbert has noted that our most likely path to success is to work with Microsoft directly, and ensure that DXC is suitable to ship for us if we run into obstacles.

Blocks: 1878449
Summary: WebGPU: shader compilation with FXC is broken and abandoned → WebGPU: shader compilation with FXC is slow, broken, and abandoned
Blocks: 1872858
See Also: → 1620134
Blocks: 1886336
Blocks: 1852491
Blocks: 1852492

Currently planning on resolving this via bug 1903302.

Severity: -- → S3
Type: enhancement → defect
Depends on: 1903302
See Also: → 1908916
See Also: → 1863983
Depends on: 1938710
Blocks: 1938710
No longer depends on: 1938710
Blocks: 1939980
Blocks: 1939943
Blocks: 1939985
You need to log in before you can comment on or make changes to this bug.