pub struct AdapterInfo {
pub name: String,
pub vendor: u32,
pub device: u32,
pub device_type: DeviceType,
pub device_pci_bus_id: String,
pub driver: String,
pub driver_info: String,
pub backend: Backend,
pub subgroup_min_size: u32,
pub subgroup_max_size: u32,
pub transient_saves_memory: bool,
pub limit_bucket: Option<AdapterLimitBucketInfo>,
}Expand description
Information about an adapter.
Fields§
§name: StringAdapter name
vendor: u32Backend-specific vendor ID of the adapter
This generally is a 16-bit PCI vendor ID in the least significant bytes of this field. However, more significant bytes may be non-zero if the backend uses a different representation.
- For
Backend::Vulkan, theVkPhysicalDeviceProperties::vendorIDis used, which is a superset of PCI IDs.
device: u32Backend-specific device ID of the adapter
This generally is a 16-bit PCI device ID in the least significant bytes of this field. However, more significant bytes may be non-zero if the backend uses a different representation.
- For
Backend::Vulkan, theVkPhysicalDeviceProperties::deviceIDis used, which is a superset of PCI IDs.
device_type: DeviceTypeType of device
device_pci_bus_id: StringBackend-specific PCI bus ID of the adapter.
- For
Backend::Vulkan,VkPhysicalDevicePCIBusInfoPropertiesEXTis used, if available, in the formbus:device.function, e.g.0000:01:00.0.
driver: StringDriver name
driver_info: StringDriver info
backend: BackendBackend used for device
subgroup_min_size: u32Minimum possible size of a subgroup on this adapter. Will
never be lower than crate::MINIMUM_SUBGROUP_MIN_SIZE.
This will vary from device to device. Typical values are listed below.
- NVIDIA: 32
- AMD GCN/Vega: 64
- AMD RDNA+: 32
- Intel: 8 or 16
- Qualcomm: 64
- WARP: 4
- lavapipe: 8
subgroup_max_size: u32Maximum possible size of a subgroup on this adapter. Will
never be higher than crate::MAXIMUM_SUBGROUP_MAX_SIZE.
This will vary from device to device. Typical values are listed below:
- NVIDIA: 32
- AMD GCN/Vega: 64
- AMD RDNA+: 64
- Intel: 16 or 32
- Qualcomm: 128
- WARP: 4 or 128
- lavapipe: 8
transient_saves_memory: boolIf true, adding [TextureUsages::TRANSIENT] to a texture will decrease memory usage.
limit_bucket: Option<AdapterLimitBucketInfo>If limit bucketing was requested, contains the name of the applied bucket and the original capabilities of the adapter.
Implementations§
Source§impl AdapterInfo
impl AdapterInfo
Sourcepub const fn new(device_type: DeviceType, backend: Backend) -> AdapterInfo
pub const fn new(device_type: DeviceType, backend: Backend) -> AdapterInfo
Create a new AdapterInfo with the given device type and backend.
All other info fields are not populated.
Trait Implementations§
Source§impl Clone for AdapterInfo
impl Clone for AdapterInfo
Source§fn clone(&self) -> AdapterInfo
fn clone(&self) -> AdapterInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdapterInfo
impl Debug for AdapterInfo
Source§impl<'de> Deserialize<'de> for AdapterInfo
impl<'de> Deserialize<'de> for AdapterInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdapterInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdapterInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for AdapterInfo
impl Hash for AdapterInfo
Source§impl PartialEq for AdapterInfo
impl PartialEq for AdapterInfo
Source§impl Serialize for AdapterInfo
impl Serialize for AdapterInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for AdapterInfo
impl StructuralPartialEq for AdapterInfo
Auto Trait Implementations§
impl Freeze for AdapterInfo
impl RefUnwindSafe for AdapterInfo
impl Send for AdapterInfo
impl Sync for AdapterInfo
impl Unpin for AdapterInfo
impl UnwindSafe for AdapterInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more