pub struct ContextOptions {
pub backends: Backends,
pub adapter_name: Option<String>,
pub low_power: bool,
pub min_storage_buffers_per_stage: u32,
pub limits_cap: Option<LimitsCap>,
pub label: String,
}Expand description
How the app wants the device made.
Fields§
§backends: BackendsThe backends to load (see crate::backend::compute_backends).
adapter_name: Option<String>Prefer the adapter called this when present (the app’s setting); else the default choice.
low_power: boolAsk wgpu for the low-power adapter instead of the high-performance one.
min_storage_buffers_per_stage: u32The fewest storage buffers per shader stage the app’s kernels bind; fewer is refused.
limits_cap: Option<LimitsCap>Lower the device limits, to reproduce a smaller adapter (parse_limits_cap).
label: StringThe device’s debug label.
Implementations§
Trait Implementations§
Source§impl Clone for ContextOptions
impl Clone for ContextOptions
Auto Trait Implementations§
impl Forget for ContextOptions
impl Freeze for ContextOptions
impl RefUnwindSafe for ContextOptions
impl Send for ContextOptions
impl Sync for ContextOptions
impl Unpin for ContextOptions
impl UnsafeUnpin for ContextOptions
impl UnwindSafe for ContextOptions
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
Mutably borrows from an owned value. Read more