pub struct GpuProfile {
pub vendor: GpuVendor,
pub tier: GpuTier,
pub memory_budget_bytes: u64,
pub unified_memory: bool,
pub discrete: bool,
}Expand description
A coarse, Copy snapshot of the active GPU’s class, queried from the backend
once it is built (mirrors DeviceCapabilities). Read at init to choose
sensible default graphics quality; never persisted, re-queried each launch so
it is always correct for the current device + driver. The GPU name is
deliberately omitted (it is not Copy); a backend exposes the name separately
when a UI needs it.
Fields§
§vendor: GpuVendorThe GPU’s vendor.
tier: GpuTierThe performance tier the probe placed the GPU in.
memory_budget_bytes: u64Dedicated VRAM on a discrete GPU, or the recommended working-set on a unified-memory GPU. 0 when the backend / driver cannot report it.
unified_memory: boolWhether the GPU shares memory with the host.
discrete: boolWhether the GPU is a discrete card.
Implementations§
Source§impl GpuProfile
impl GpuProfile
Sourcepub const UNKNOWN: GpuProfile
pub const UNKNOWN: GpuProfile
Conservative fallback for a backend that does not report a profile:
unknown hardware picks the cautious baseline, never a high preset. The
opposite default from DeviceCapabilities::ALL – a feature gate fails
open (assume capable, no-op with a warning if not), but quality
auto-config fails safe (assume modest, never overdrive a weak GPU).
Trait Implementations§
Source§impl Clone for GpuProfile
impl Clone for GpuProfile
Source§fn clone(&self) -> GpuProfile
fn clone(&self) -> GpuProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GpuProfile
Source§impl Debug for GpuProfile
impl Debug for GpuProfile
Source§impl Default for GpuProfile
impl Default for GpuProfile
Source§fn default() -> GpuProfile
fn default() -> GpuProfile
Auto Trait Implementations§
impl Freeze for GpuProfile
impl RefUnwindSafe for GpuProfile
impl Send for GpuProfile
impl Sync for GpuProfile
impl Unpin for GpuProfile
impl UnsafeUnpin for GpuProfile
impl UnwindSafe for GpuProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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().