Skip to main content

VulkanHost

Struct VulkanHost 

Source
#[non_exhaustive]
pub struct VulkanHost { pub api_version: VulkanVersion, }
Expand description

The host’s Vulkan runtime.

Reported from the loader and the installed ICD manifests, so — unlike RocmHost and OneApiHost — this describes a runtime that is actually present rather than a toolkit that may be. There is no architecture field: SPIR-V is portable and driver-compiled, so a Vulkan build has no per-GPU target to match.

Host-level, not per-device: see api_version for what the number does and does not promise.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§api_version: VulkanVersion

Highest API version any installed driver advertises in its ICD manifest.

A driver’s own static declaration on disk, which makes it two things it is easy to mistake it for:

  • Not per-device. With two drivers installed — an AMD iGPU beside an NVIDIA dGPU, say — this is the higher of the two and may describe neither card. A specific device’s version comes from vkGetPhysicalDeviceProperties, which means linking the loader and creating an instance; this crate deliberately does neither.
  • Not the loader’s instance version. That is what vulkaninfo and vkEnumerateInstanceVersion report, and it is usually the newer of the two, so the numbers routinely disagree. The driver’s is the one that binds in practice: loaders track the current headers while drivers implement features on their own schedule.

Compare on major/minor only — see VulkanVersion.

Trait Implementations§

Source§

impl Clone for VulkanHost

Source§

fn clone(&self) -> VulkanHost

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VulkanHost

Source§

impl Debug for VulkanHost

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for VulkanHost

Source§

impl PartialEq for VulkanHost

Source§

fn eq(&self, other: &VulkanHost) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VulkanHost

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.