Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(adapter): document device and vendor IDs repr. #3763

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Bottom level categories:
#### General

- Document feature requirements for `DEPTH32FLOAT_STENCIL8` by @ErichDonGubler in [#3734](https://github.com/gfx-rs/wgpu/pull/3734).
- Flesh out docs. for `AdapterInfo::{device,vendor}` by @ErichDonGubler in [#3763](https://github.com/gfx-rs/wgpu/pull/3763).

### Bug Fixes

Expand Down
24 changes: 20 additions & 4 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,12 +1303,28 @@ 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, which is
/// a superset of PCI IDs.
///
/// [`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, which is
/// a superset of PCI IDs.
///
/// [`VkPhysicalDeviceProperties::deviceID`]: 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