Skip to main content

RendererDiagnostics

Struct RendererDiagnostics 

Source
pub struct RendererDiagnostics<'renderer> { /* private fields */ }
Expand description

Adapter and presentation context captured from the active renderer.

This view does not allocate, query the GPU, or wait for completion. A host should record it with performance reports instead of guessing the selected adapter from the machine’s hardware. Borrowing prevents resize or device replacement while the view is in use; obtain a new view after either event. The strings describe driver-reported identity, not an independent hardware attestation. An empty PCI address means instance identity is unavailable.

Implementations§

Source§

impl RendererDiagnostics<'_>

Source

pub fn adapter_name(&self) -> &str

Human-readable name of the adapter actually selected by the renderer.

Source

pub const fn backend(&self) -> &'static str

Stable lowercase graphics API name, such as vulkan.

Source

pub const fn vendor_id(&self) -> u32

Driver-reported PCI vendor ID; together with device ID identifies a model.

Source

pub const fn device_id(&self) -> u32

Driver-reported device model ID, not a physical-instance identifier.

Source

pub fn pci_bus_id(&self) -> &str

PCI address of the selected physical GPU, or empty when unavailable.

Source

pub fn driver(&self) -> &str

Driver name reported by the active adapter.

Source

pub fn driver_info(&self) -> &str

Driver version or implementation details reported by the adapter.

Source

pub const fn scale_factor(&self) -> f64

Physical surface pixels per logical screen pixel at capture time.

Source

pub const fn physical_size(&self) -> [u32; 2]

Configured surface width and height in physical pixels.

Source

pub const fn surface_format(&self) -> TextureFormat

Actual presentation texture format, not an assumed offscreen format.

Source

pub const fn sample_count(&self) -> u32

Raster sample count selected for the actual presentation format.

Source

pub const fn present_mode(&self) -> RendererSurfacePresentMode

Actual presentation mode after capability-dependent fallback.

Trait Implementations§

Source§

impl<'renderer> Clone for RendererDiagnostics<'renderer>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'renderer> Copy for RendererDiagnostics<'renderer>

Source§

impl<'renderer> Debug for RendererDiagnostics<'renderer>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'renderer> PartialEq for RendererDiagnostics<'renderer>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'renderer> StructuralPartialEq for RendererDiagnostics<'renderer>

Auto Trait Implementations§

§

impl<'renderer> Freeze for RendererDiagnostics<'renderer>

§

impl<'renderer> RefUnwindSafe for RendererDiagnostics<'renderer>

§

impl<'renderer> Send for RendererDiagnostics<'renderer>

§

impl<'renderer> Sync for RendererDiagnostics<'renderer>

§

impl<'renderer> Unpin for RendererDiagnostics<'renderer>

§

impl<'renderer> UnsafeUnpin for RendererDiagnostics<'renderer>

§

impl<'renderer> UnwindSafe for RendererDiagnostics<'renderer>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,