Selects which DX12 shader compiler to use.
wgpu-hal/dx12-shader-compiler feature isn’t enabled then this will fall back
to the Fxc compiler at runtime and log an error.
This feature is always enabled when using
Dxc option is selected, but
dxil.dll files aren’t found,
then this will fall back to the Fxc compiler at runtime and log an error.
wgpu::utils::init::dx12_shader_compiler_from_env can be used to set the compiler
WGPU_DX12_SHADER_COMPILER environment variable, but this should only be used for testing.
The Fxc compiler (default) is old, slow and unmaintained.
However, it doesn’t require any additional .dlls to be shipped with the application.
Path to the
dxcompiler.dll file. Passing
None will use standard platform specific dll loading rules.
The Dxc compiler is new, fast and maintained.
However, it requires both
dxil.dll to be shipped with the application.
These files can be downloaded from https://github.com/microsoft/DirectXShaderCompiler/releases
Auto Trait Implementations§
Returns the argument unchanged.