pub struct Options {
pub shader_model: ShaderModel,
pub binding_map: BindingMap,
pub fake_missing_bindings: bool,
pub special_constants_binding: Option<BindTarget>,
pub push_constants_target: Option<BindTarget>,
pub sampler_heap_target: SamplerHeapBindTargets,
pub sampler_buffer_binding_map: SamplerIndexBufferBindingMap,
pub dynamic_storage_buffer_offsets_targets: DynamicStorageBufferOffsetsTargets,
pub external_texture_binding_map: ExternalTextureBindingMap,
pub zero_initialize_workgroup_memory: bool,
pub restrict_indexing: bool,
pub force_loop_bounding: bool,
}Expand description
Configuration used in the Writer.
Fields§
§shader_model: ShaderModelThe hlsl shader model to be used
binding_map: BindingMapHLSL binding information for each Naga global variable.
This maps Naga GlobalVariable’s ResourceBindings to a
BindTarget specifying its register number and space, along with
other details necessary to generate a full HLSL declaration for it,
or to access its value.
This must provide a BindTarget for every GlobalVariable in the
Module that has a binding.
fake_missing_bindings: boolDon’t panic on missing bindings, instead generate any HLSL.
special_constants_binding: Option<BindTarget>Add special constants to SV_VertexIndex and SV_InstanceIndex,
to make them work like in Vulkan/Metal, with help of the host.
push_constants_target: Option<BindTarget>HLSL binding information for the PushConstant global, if present.
If a module contains a global in the PushConstant address space, the
dx12 backend stores its value directly in the root signature as a
series of D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS, whose binding
information is given here.
sampler_heap_target: SamplerHeapBindTargetsHLSL binding information for the sampler heap and comparison sampler heap.
sampler_buffer_binding_map: SamplerIndexBufferBindingMapMapping of each bind group’s sampler index buffer to a bind target.
dynamic_storage_buffer_offsets_targets: DynamicStorageBufferOffsetsTargetsBind target for dynamic storage buffer offsets
external_texture_binding_map: ExternalTextureBindingMapHLSL binding information for External image global variables.
See ExternalTextureBindTarget for details.
zero_initialize_workgroup_memory: boolShould workgroup variables be zero initialized (by polyfilling)?
restrict_indexing: boolShould we restrict indexing of vectors, matrices and arrays?
force_loop_bounding: boolIf set, loops will have code injected into them, forcing the compiler to think the number of iterations is bounded.
Implementations§
Source§impl Options
impl Options
fn resolve_resource_binding( &self, res_binding: &ResourceBinding, ) -> Result<BindTarget, EntryPointError>
fn resolve_external_texture_resource_binding( &self, res_binding: &ResourceBinding, ) -> Result<ExternalTextureBindTarget, EntryPointError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Options
impl<'de> Deserialize<'de> for Options
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.