pub struct PhysicalDeviceProperties {Show 15 fields
supported_extensions: Vec<ExtensionProperties>,
properties: PhysicalDeviceProperties,
maintenance_3: Option<PhysicalDeviceMaintenance3Properties<'static>>,
maintenance_4: Option<PhysicalDeviceMaintenance4Properties<'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>>,
mesh_shader: Option<PhysicalDeviceMeshShaderPropertiesEXT<'static>>,
multiview: Option<PhysicalDeviceMultiviewPropertiesKHR<'static>>,
pci_bus_info: Option<PhysicalDevicePCIBusInfoPropertiesEXT<'static>>,
device_api_version: u32,
cooperative_matrix_properties: Vec<CooperativeMatrixProperties>,
}vulkan only.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
VkExtensionPropertiesstructs for all available extensions, and - the per-extension properties structures for the available extensions that
wgpucares about.
Generally, if you get it from any of these functions, it’s stored here:
vkEnumerateDeviceExtensionPropertiesvkGetPhysicalDevicePropertiesvkGetPhysicalDeviceProperties2
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: PhysicalDevicePropertiesProperties 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.
maintenance_4: Option<PhysicalDeviceMaintenance4Properties<'static>>Additional vk::PhysicalDevice properties from the
VK_KHR_maintenance4 extension, promoted to Vulkan 1.3.
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.
mesh_shader: Option<PhysicalDeviceMeshShaderPropertiesEXT<'static>>Additional vk::PhysicalDevice properties from the
VK_EXT_mesh_shader extension.
multiview: Option<PhysicalDeviceMultiviewPropertiesKHR<'static>>Additional vk::PhysicalDevice properties from the
VK_KHR_multiview extension.
pci_bus_info: Option<PhysicalDevicePCIBusInfoPropertiesEXT<'static>>VK_EXT_pci_bus_info extension.
device_api_version: u32The device API version.
Which is the version of Vulkan supported for device-level functionality.
It is associated with a VkPhysicalDevice and its children.
cooperative_matrix_properties: Vec<CooperativeMatrixProperties>Supported cooperative matrix configurations.
This is determined by querying vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR.
Implementations§
Source§impl PhysicalDeviceProperties
impl PhysicalDeviceProperties
pub fn properties(&self) -> PhysicalDeviceProperties
pub fn supports_extension(&self, extension: &CStr) -> bool
Sourcefn get_required_extensions(
&self,
requested_features: Features,
) -> Vec<&'static CStr>
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.
fn to_wgpu_limits(&self) -> Limits
Sourcefn to_hal_alignments(&self, using_robustness2: bool) -> Alignments
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’srobustBufferAccess2feature to apply bounds checks to shader buffer access,using_robustness2must betrue. -
Otherwise, this adapter must use Naga to inject bounds checks on buffer accesses, and
using_robustness2must befalse.
Trait Implementations§
Source§impl Debug for PhysicalDeviceProperties
impl Debug for PhysicalDeviceProperties
Source§impl Default for PhysicalDeviceProperties
impl Default for PhysicalDeviceProperties
Source§fn default() -> PhysicalDeviceProperties
fn default() -> PhysicalDeviceProperties
Auto Trait Implementations§
impl Freeze for PhysicalDeviceProperties
impl RefUnwindSafe for PhysicalDeviceProperties
impl Send for PhysicalDeviceProperties
impl Sync for PhysicalDeviceProperties
impl Unpin for PhysicalDeviceProperties
impl UnwindSafe for PhysicalDeviceProperties
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> 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