Open Bug 1903302 Opened 4 months ago Updated 3 months ago

Switch to DXC on Windows

Categories

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

enhancement

Tracking

()

ASSIGNED

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We have a lot of issues with fxc which is what we use to compile HLSL shaders on windows. Dxc can be assumed to be present on the system, however it is very buggy, unmaintained and does not support some of the features we need in WebGPU.

dxc unfortunately cannot be assumed to be present on the OS. It is part of the windows SDK or releases can be downloaded on github: https://github.com/microsoft/DirectXShaderCompiler/releases

To use dxc we need two DLLs:

  • d3dcompiler.dll which is in the order of 18MB, is open source and we could build it ourselves should we want to.
  • dxil.dll is in the order of 2MB, is not open source and is necessary to sign the shaders produced by the former.

Both have official builds available for x86, x64 and arm64.

With upcoming versions of the windows SDK we'll be able to get rid of dxil.dll as its functionality will be merged into dxcompiler.dll.

Chrome ships dxc (They make their own builds of d3dcompiler.dll, probably so that they can patch bugs quickly).

TODO

  • [ ] Make the build system pull and package dxcompiler.dll and dxc.dll.
  • [ ] Remove the dependency on hassle-rs from wgpu-hal (it brings a lot of extra non-trivial code to audit and contains incompatible dependency versions).
  • [ ] enable the dxc_shader_compiler feature in wgpu-hal.
  • [ ] Add the llvm release license to the list of licenses we depend on.
Summary: Swicth to DXC on windows → Switch to DXC on Windows
Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: