pub struct AdapterRecord {
pub index: usize,
pub name: String,
pub backend: &'static str,
pub luid: Option<u64>,
pub software: bool,
pub renders: Result<(), String>,
pub decodes: Result<(), String>,
pub gpu_encodes: Vec<(&'static str, Result<(), String>)>,
}Expand description
What one adapter was found to do. Checks that were not made are Err, so the choice never
assumes a capability.
Fields§
§index: usizeIts position in the backend’s enumeration, which an index pin names.
name: StringThe adapter’s name, which a name pin matches.
backend: &'static strdx12, vulkan or metal.
luid: Option<u64>The DXGI adapter LUID, where the backend has one.
software: boolWARP, lavapipe, llvmpipe or another adapter the backend flags as software.
renders: Result<(), String>Whether a device opens on it, or why not.
decodes: Result<(), String>Whether hardware decode imports into its device, or why not.
gpu_encodes: Vec<(&'static str, Result<(), String>)>Per codec asked about, whether the device encodes it on the GPU, or why not.
Implementations§
Source§impl AdapterRecord
impl AdapterRecord
Sourcepub fn unasked(
index: usize,
name: String,
backend: &'static str,
software: bool,
) -> Self
pub fn unasked( index: usize, name: String, backend: &'static str, software: bool, ) -> Self
A record of an adapter nothing has been asked of yet.
Sourcepub fn encoded_codecs(&self) -> Vec<&'static str>
pub fn encoded_codecs(&self) -> Vec<&'static str>
The codecs the device encodes on the GPU.
Sourcepub fn gpu_encode_reason(&self) -> Option<String>
pub fn gpu_encode_reason(&self) -> Option<String>
Why the device encodes no codec on the GPU: the first refusal, or that none was asked.
Trait Implementations§
Source§impl Clone for AdapterRecord
impl Clone for AdapterRecord
Source§impl Debug for AdapterRecord
impl Debug for AdapterRecord
impl Eq for AdapterRecord
Source§impl PartialEq for AdapterRecord
impl PartialEq for AdapterRecord
impl StructuralPartialEq for AdapterRecord
Auto Trait Implementations§
impl Freeze for AdapterRecord
impl RefUnwindSafe for AdapterRecord
impl Send for AdapterRecord
impl Sync for AdapterRecord
impl Unpin for AdapterRecord
impl UnsafeUnpin for AdapterRecord
impl UnwindSafe for AdapterRecord
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.