Struct wgpu_hal::vulkan::adapter::PhysicalDeviceProperties

source ·
pub struct PhysicalDeviceProperties {
    supported_extensions: Vec<ExtensionProperties>,
    properties: PhysicalDeviceProperties,
    maintenance_3: Option<PhysicalDeviceMaintenance3Properties<'static>>,
    descriptor_indexing: Option<PhysicalDeviceDescriptorIndexingPropertiesEXT<'static>>,
    acceleration_structure: Option<PhysicalDeviceAccelerationStructurePropertiesKHR<'static>>,
    driver: Option<PhysicalDeviceDriverPropertiesKHR<'static>>,
    subgroup: Option<PhysicalDeviceSubgroupProperties<'static>>,
    subgroup_size_control: Option<PhysicalDeviceSubgroupSizeControlProperties<'static>>,
    robustness2: Option<PhysicalDeviceRobustness2PropertiesEXT<'static>>,
    device_api_version: u32,
}
Expand description

Vulkan “properties” structures gathered about a physical device.

This structure holds the properties of a vk::PhysicalDevice:

  • the standard Vulkan device properties
  • the VkExtensionProperties structs for all available extensions, and
  • the per-extension properties structures for the available extensions that wgpu cares about.

Generally, if you get it from any of these functions, it’s stored here:

  • vkEnumerateDeviceExtensionProperties
  • vkGetPhysicalDeviceProperties
  • vkGetPhysicalDeviceProperties2

This also includes a copy of the device API version, since we can use that as a shortcut for searching for an extension, if the extension has been promoted to core in the current version.

This does not include device features; for those, see PhysicalDeviceFeatures.

Fields§

§supported_extensions: Vec<ExtensionProperties>

Extensions supported by the vk::PhysicalDevice, as returned by vkEnumerateDeviceExtensionProperties.

§properties: PhysicalDeviceProperties

Properties of the vk::PhysicalDevice, as returned by vkGetPhysicalDeviceProperties.

§maintenance_3: Option<PhysicalDeviceMaintenance3Properties<'static>>

Additional vk::PhysicalDevice properties from the VK_KHR_maintenance3 extension, promoted to Vulkan 1.1.

§descriptor_indexing: Option<PhysicalDeviceDescriptorIndexingPropertiesEXT<'static>>

Additional vk::PhysicalDevice properties from the VK_EXT_descriptor_indexing extension, promoted to Vulkan 1.2.

§acceleration_structure: Option<PhysicalDeviceAccelerationStructurePropertiesKHR<'static>>

Additional vk::PhysicalDevice properties from the VK_KHR_acceleration_structure extension.

§driver: Option<PhysicalDeviceDriverPropertiesKHR<'static>>

Additional vk::PhysicalDevice properties from the VK_KHR_driver_properties extension, promoted to Vulkan 1.2.

§subgroup: Option<PhysicalDeviceSubgroupProperties<'static>>

Additional vk::PhysicalDevice properties from Vulkan 1.1.

§subgroup_size_control: Option<PhysicalDeviceSubgroupSizeControlProperties<'static>>

Additional vk::PhysicalDevice properties from the VK_EXT_subgroup_size_control extension, promoted to Vulkan 1.3.

§robustness2: Option<PhysicalDeviceRobustness2PropertiesEXT<'static>>

Additional vk::PhysicalDevice properties from the VK_EXT_robustness2 extension.

§device_api_version: u32

The device API version.

Which is the version of Vulkan supported for device-level functionality.

It is associated with a VkPhysicalDevice and its children.

Implementations§

source§

impl PhysicalDeviceProperties

source

pub fn properties(&self) -> PhysicalDeviceProperties

source

pub fn supports_extension(&self, extension: &CStr) -> bool

source

fn get_required_extensions( &self, requested_features: Features, ) -> Vec<&'static CStr>

Map requested_features to the list of Vulkan extension strings required to create the logical device.

source

fn to_wgpu_limits(&self) -> Limits

source

fn to_hal_alignments(&self, using_robustness2: bool) -> Alignments

Return a wgpu_hal::Alignments structure describing this adapter.

The using_robustness2 argument says how this adapter will implement wgpu_hal’s guarantee that shaders can only read the accessible region of bindgroup’s buffer bindings:

  • If this adapter will depend on VK_EXT_robustness2’s robustBufferAccess2 feature to apply bounds checks to shader buffer access, using_robustness2 must be true.

  • Otherwise, this adapter must use Naga to inject bounds checks on buffer accesses, and using_robustness2 must be false.

Trait Implementations§

source§

impl Debug for PhysicalDeviceProperties

source§

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

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

impl Default for PhysicalDeviceProperties

source§

fn default() -> PhysicalDeviceProperties

Returns the “default value” for a type. Read more

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> Downcast<T> for T

source§

fn downcast(&self) -> &T

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<T> WasmNotSend for T
where T: Send,

source§

impl<T> WasmNotSendSync for T

source§

impl<T> WasmNotSync for T
where T: Sync,