Open Bug 1885217 (webgpu-fxc) Opened 3 months ago Updated 2 months ago

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

Categories

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

enhancement

Tracking

()

People

(Reporter: ErichDonGubler, Unassigned)

References

(Blocks 8 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
You need to log in before you can comment on or make changes to this bug.