Struct NoopBackendOptions
pub struct NoopBackendOptions {
pub enable: bool,
pub limits: Option<Limits>,
pub features: Option<Features>,
pub device_type: Option<DeviceType>,
pub subgroup_min_size: Option<u32>,
pub subgroup_max_size: Option<u32>,
}Expand description
Configuration for the noop backend.
Part of BackendOptions.
Fields§
§enable: boolWhether to allow the noop backend to be used.
The noop backend stubs out all operations except for buffer creation and mapping, so it must not be used when not expected. Therefore, it will not be used unless explicitly enabled.
limits: Option<Limits>Specify the reported limits values. If None, reports maximally permissive limits.
features: Option<Features>Specify the reported feature support. If None, reports support for all features.
device_type: Option<DeviceType>Specify the reported device type. If None, uses crate::DeviceType::Other.
subgroup_min_size: Option<u32>Specify the reported minimum subgroup size.
subgroup_max_size: Option<u32>Specify the reported maximum subgroup size.
Implementations§
§impl NoopBackendOptions
impl NoopBackendOptions
pub fn enabled() -> NoopBackendOptions
pub fn enabled() -> NoopBackendOptions
Enable the noop backend.
pub fn from_env_or_default() -> NoopBackendOptions
pub fn from_env_or_default() -> NoopBackendOptions
Choose whether the noop backend is enabled from the environment.
It will be enabled if the environment variable WGPU_NOOP_BACKEND has the value 1
and not otherwise. Future versions may assign other meanings to other values.
pub fn with_env(self) -> NoopBackendOptions
pub fn with_env(self) -> NoopBackendOptions
Takes the given options, modifies them based on the environment variables, and returns the result.
See from_env_or_default() for the interpretation.
Trait Implementations§
§impl Clone for NoopBackendOptions
impl Clone for NoopBackendOptions
§fn clone(&self) -> NoopBackendOptions
fn clone(&self) -> NoopBackendOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for NoopBackendOptions
impl Debug for NoopBackendOptions
§impl Default for NoopBackendOptions
impl Default for NoopBackendOptions
§fn default() -> NoopBackendOptions
fn default() -> NoopBackendOptions
Auto Trait Implementations§
impl Freeze for NoopBackendOptions
impl RefUnwindSafe for NoopBackendOptions
impl Send for NoopBackendOptions
impl Sync for NoopBackendOptions
impl Unpin for NoopBackendOptions
impl UnwindSafe for NoopBackendOptions
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§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