pub struct Options {
pub lang_version: (u8, u8),
pub per_entry_point_map: EntryPointResourceMap,
pub inline_samplers: Vec<InlineSampler>,
pub spirv_cross_compatibility: bool,
pub fake_missing_bindings: bool,
pub bounds_check_policies: BoundsCheckPolicies,
pub zero_initialize_workgroup_memory: bool,
pub force_loop_bounding: bool,
pub task_dispatch_limits: Option<TaskDispatchLimits>,
pub mesh_shader_primitive_indices_clamp: bool,
pub emit_int_div_checks: bool,
}Fields§
§lang_version: (u8, u8)(Major, Minor) target version of the Metal Shading Language.
per_entry_point_map: EntryPointResourceMapMap of entry-point resources, indexed by entry point function name, to slots.
inline_samplers: Vec<InlineSampler>Samplers to be inlined into the code.
spirv_cross_compatibility: boolMake it possible to link different stages via SPIRV-Cross.
fake_missing_bindings: boolDon’t panic on missing bindings, instead generate invalid MSL.
bounds_check_policies: BoundsCheckPoliciesBounds checking policies.
zero_initialize_workgroup_memory: boolShould workgroup variables be zero initialized (by polyfilling)?
force_loop_bounding: boolIf set, loops will have code injected into them, forcing the compiler to think the number of iterations is bounded.
task_dispatch_limits: Option<TaskDispatchLimits>Whether and how checks in the task shader should verify the dispatched mesh grid size.
mesh_shader_primitive_indices_clamp: boolWhether to validate the output of a mesh shader workgroup.
emit_int_div_checks: boolIf true (the default), integer division and modulo operations use wrapper functions that guard against division by zero and signed overflow. Set to false to emit raw division for faster compute shaders where the developer guarantees non-zero divisors.
Implementations§
Source§impl Options
impl Options
fn resolve_local_binding( &self, binding: &Binding, mode: LocationMode, ) -> Result<ResolvedBinding, Error>
fn get_entry_point_resources( &self, ep: &EntryPoint, ) -> Option<&EntryPointResources>
fn get_resource_binding_target( &self, ep: &EntryPoint, res_binding: &ResourceBinding, ) -> Option<&BindTarget>
fn resolve_resource_binding( &self, ep: &EntryPoint, res_binding: &ResourceBinding, ) -> Result<ResolvedBinding, EntryPointError>
fn resolve_immediates( &self, ep: &EntryPoint, ) -> Result<ResolvedBinding, EntryPointError>
fn resolve_sizes_buffer( &self, ep: &EntryPoint, ) -> Result<ResolvedBinding, 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
key and return true if they are equal.