pub enum GraphicsAdapter {
Luid([u8; 8]),
Uuid([u8; 16]),
}Expand description
A graphics adapter, by the id bytes Vulkan and DXGI report for it.
Windows takes the LUID, other platforms the UUID (header,
QarGraphicsDeviceId). Take both from VkPhysicalDeviceIDProperties
(device_luid, valid when device_luid_valid, and device_uuid) of the
physical device the application renders on, so frames need no cross-GPU
copy. The C API supports NVIDIA adapters only; another adapter fails with
crate::StatusCode::ARGUMENT_NOT_SUPPORTED.
Variants§
Luid([u8; 8])
VkPhysicalDeviceIDProperties::deviceLUID, bytes in memory order.
Uuid([u8; 16])
VkPhysicalDeviceIDProperties::deviceUUID.
Implementations§
Source§impl GraphicsAdapter
impl GraphicsAdapter
Sourcepub fn parse(text: &str) -> Result<Self>
pub fn parse(text: &str) -> Result<Self>
Parses the hex of the id bytes, as fmt::Display writes it: 16 hex
digits are a LUID, 32 a UUID. Upper-case digits are accepted.
Trait Implementations§
Source§impl Clone for GraphicsAdapter
impl Clone for GraphicsAdapter
impl Copy for GraphicsAdapter
Source§impl Debug for GraphicsAdapter
impl Debug for GraphicsAdapter
Source§impl Display for GraphicsAdapter
Lowercase hex of the id bytes, the format GraphicsAdapter::parse reads.
impl Display for GraphicsAdapter
Lowercase hex of the id bytes, the format GraphicsAdapter::parse reads.
impl Eq for GraphicsAdapter
Source§impl Hash for GraphicsAdapter
impl Hash for GraphicsAdapter
Source§impl PartialEq for GraphicsAdapter
impl PartialEq for GraphicsAdapter
impl StructuralPartialEq for GraphicsAdapter
Auto Trait Implementations§
impl Freeze for GraphicsAdapter
impl RefUnwindSafe for GraphicsAdapter
impl Send for GraphicsAdapter
impl Sync for GraphicsAdapter
impl Unpin for GraphicsAdapter
impl UnsafeUnpin for GraphicsAdapter
impl UnwindSafe for GraphicsAdapter
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