Struct Options
pub struct Options {
pub shader_model: ShaderModel,
pub binding_map: BTreeMap<ResourceBinding, BindTarget>,
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: BTreeMap<SamplerIndexBufferKey, BindTarget>,
pub dynamic_storage_buffer_offsets_targets: BTreeMap<u32, OffsetsBindTarget>,
pub external_texture_binding_map: BTreeMap<ResourceBinding, ExternalTextureBindTarget>,
pub zero_initialize_workgroup_memory: bool,
pub restrict_indexing: bool,
pub force_loop_bounding: bool,
}unstable-wgpu-27 only.Expand description
Configuration used in the Writer.
Fields§
§shader_model: ShaderModelThe hlsl shader model to be used
binding_map: BTreeMap<ResourceBinding, BindTarget>HLSL 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: BTreeMap<SamplerIndexBufferKey, BindTarget>Mapping of each bind group’s sampler index buffer to a bind target.
dynamic_storage_buffer_offsets_targets: BTreeMap<u32, OffsetsBindTarget>Bind target for dynamic storage buffer offsets
external_texture_binding_map: BTreeMap<ResourceBinding, ExternalTextureBindTarget>HLSL 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.
Trait Implementations§
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.