pub struct GpuContextConfig {
pub backend: BackendPreference,
pub power_preference: GpuPowerPreference,
pub required_features: Features,
pub required_limits: Option<Limits>,
pub debug: bool,
pub label: Option<String>,
}Expand description
Configuration for GPU context initialization.
Fields§
§backend: BackendPreferenceBackend preference for adapter selection.
power_preference: GpuPowerPreferencePower preference for GPU selection.
required_features: FeaturesRequired GPU features.
required_limits: Option<Limits>Required GPU limits.
debug: boolEnable debug mode (validation layers).
label: Option<String>Label for the device (for debugging).
Implementations§
Source§impl GpuContextConfig
impl GpuContextConfig
Sourcepub fn with_backend(self, backend: BackendPreference) -> Self
pub fn with_backend(self, backend: BackendPreference) -> Self
Set backend preference.
Sourcepub fn with_power_preference(self, power: GpuPowerPreference) -> Self
pub fn with_power_preference(self, power: GpuPowerPreference) -> Self
Set power preference.
Sourcepub fn with_features(self, features: Features) -> Self
pub fn with_features(self, features: Features) -> Self
Set required features.
Sourcepub fn with_limits(self, limits: Limits) -> Self
pub fn with_limits(self, limits: Limits) -> Self
Set required limits.
Sourcepub fn with_debug(self, debug: bool) -> Self
pub fn with_debug(self, debug: bool) -> Self
Enable debug mode.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Set device label.
Trait Implementations§
Source§impl Clone for GpuContextConfig
impl Clone for GpuContextConfig
Source§fn clone(&self) -> GpuContextConfig
fn clone(&self) -> GpuContextConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpuContextConfig
impl Debug for GpuContextConfig
Auto Trait Implementations§
impl Freeze for GpuContextConfig
impl RefUnwindSafe for GpuContextConfig
impl Send for GpuContextConfig
impl Sync for GpuContextConfig
impl Unpin for GpuContextConfig
impl UnsafeUnpin for GpuContextConfig
impl UnwindSafe for GpuContextConfig
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