Switch to DXC on Windows
Categories
(Core :: Graphics: WebGPU, enhancement, P3)
Tracking
()
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.
Updated•4 months ago
|
Updated•4 months ago
|
Assignee | ||
Comment 1•3 months ago
|
||
Updated•3 months ago
|
Description
•