pub enum Dx12Compiler {
Fxc,
Dxc {
dxil_path: Option<PathBuf>,
dxc_path: Option<PathBuf>,
},
}
Expand description
Selects which DX12 shader compiler to use.
If the Dxc
option is selected, but dxcompiler.dll
and 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
from the WGPU_DX12_SHADER_COMPILER
environment variable, but this should only be used for testing.
Variants§
Fxc
The Fxc compiler (default) is old, slow and unmaintained.
However, it doesn’t require any additional .dlls to be shipped with the application.
Dxc
The Dxc compiler is new, fast and maintained.
However, it requires both dxcompiler.dll
and dxil.dll
to be shipped with the application.
These files can be downloaded from https://github.com/microsoft/DirectXShaderCompiler/releases.
Minimum supported version: v1.5.2010
It also requires WDDM 2.1 (Windows 10 version 1607).
Trait Implementations§
Source§impl Clone for Dx12Compiler
impl Clone for Dx12Compiler
Source§fn clone(&self) -> Dx12Compiler
fn clone(&self) -> Dx12Compiler
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Dx12Compiler
impl Debug for Dx12Compiler
Source§impl Default for Dx12Compiler
impl Default for Dx12Compiler
Source§fn default() -> Dx12Compiler
fn default() -> Dx12Compiler
Auto Trait Implementations§
impl Freeze for Dx12Compiler
impl RefUnwindSafe for Dx12Compiler
impl Send for Dx12Compiler
impl Sync for Dx12Compiler
impl Unpin for Dx12Compiler
impl UnwindSafe for Dx12Compiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)