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: Self
pub const UNKNOWN: Self
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 more