Skip to content

Commit

Permalink
docs(adapter): document device and vendor IDs repr.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed May 9, 2023
1 parent 4d8a7ed commit 45f7a52
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,12 +1303,26 @@ pub enum DeviceType {
pub struct AdapterInfo {
/// Adapter name
pub name: String,
/// Vendor PCI id of the adapter
/// [`Backend`]-specific vendor ID of the adapter
///
/// If the vendor has no PCI id, then this value will be the backend's vendor id equivalent. On Vulkan,
/// Mesa would have a vendor id equivalent to it's `VkVendorId` value.
/// 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`], the [`VkPhysicalDeviceProperties::vendorID`] is used.
///
/// [`VkPhysicalDeviceProperties::vendorID`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProperties.html
pub vendor: u32,
/// PCI id of the adapter
/// [`Backend`]-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`], the [`VkPhysicalDeviceProperties::deviceID`] is used.
///
/// [`VkPhysicalDeviceProperties::vendorID`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProperties.html
pub device: u32,
/// Type of device
pub device_type: DeviceType,
Expand Down

0 comments on commit 45f7a52

Please sign in to comment.