pub struct GpuClassInput {
pub vendor: GpuVendor,
pub memory_budget_bytes: u64,
pub discrete: bool,
pub apple_family: u8,
}Expand description
The cheap signals every backend can gather about its GPU, mapped to a coarse
GpuTier by one shared rule so the three backends classify consistently and
the mapping is unit-testable without a GPU. The backends differ in what they
can report (Apple exposes a GPU family; DirectX / Vulkan expose a VRAM figure
and a discrete / integrated flag), so this carries the union and the rule
uses whichever signals are present.
Fields§
§vendor: GpuVendorThe GPU’s vendor.
memory_budget_bytes: u64Device memory the driver reports as budgeted for this process.
discrete: boolWhether the GPU is a discrete card.
apple_family: u8Apple GPU family generation rank (7 = M1 .. 10 = M4), or 0 for a non-Apple GPU. Apple silicon classifies by generation; everything else by VRAM.
Auto Trait Implementations§
impl Freeze for GpuClassInput
impl RefUnwindSafe for GpuClassInput
impl Send for GpuClassInput
impl Sync for GpuClassInput
impl Unpin for GpuClassInput
impl UnsafeUnpin for GpuClassInput
impl UnwindSafe for GpuClassInput
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