Switch to DXC on Windows
Categories
(Core :: Graphics: WebGPU, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
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
- [x] Make the build system pull and package dxcompiler.dll and dxc.dll.
- [x] 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).
- [x] enable the
dxc_shader_compilerfeature in wgpu-hal. - [x] Add the llvm release license to the list of licenses we depend on.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Backed out for causing python failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/ec1c538d4ef7cda610a57cb11ef0c65467bcdd1b
Failure log: https://treeherder.mozilla.org/logviewer?job_id=485448444&repo=autoland&lineNumber=2572
| Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•