pub enum Dx12Compiler {
Fxc,
DynamicDxc {
dxc_path: String,
max_shader_model: DxcShaderModel,
},
StaticDxc,
}Expand description
Selects which DX12 shader compiler to use.
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.
DynamicDxc
The Dxc compiler is new, fast and maintained.
However, it requires dxcompiler.dll to be shipped with the application.
These files can be downloaded from https://github.com/microsoft/DirectXShaderCompiler/releases.
Minimum supported version: v1.8.2502
It also requires WDDM 2.1 (Windows 10 version 1607).
Fields
max_shader_model: DxcShaderModelMaximum shader model the given dll supports.
StaticDxc
The statically-linked variant of Dxc.
The static-dxc feature is required for this setting to be used successfully on DX12.
Not available on windows-aarch64-pc-* targets.
Implementations§
Source§impl Dx12Compiler
impl Dx12Compiler
Sourcepub fn default_dynamic_dxc() -> Self
pub fn default_dynamic_dxc() -> Self
Helper function to construct a DynamicDxc variant with default paths.
The dll must support at least shader model 6.8.
Trait Implementations§
Source§impl Clone for Dx12Compiler
impl Clone for Dx12Compiler
Source§fn clone(&self) -> Dx12Compiler
fn clone(&self) -> Dx12Compiler
1.0.0§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)