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
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
’srobustBufferAccess2
feature to apply bounds checks to shader buffer access,using_robustness2
must betrue
. -
Otherwise, this adapter must use Naga to inject bounds checks on buffer accesses, and
using_robustness2
must befalse
.