pub struct PhysicalDevice {Show 21 fields
pub depth_stencil_resolve_properties: DepthStencilResolveProperties,
pub features_v1_0: Vulkan10Features,
pub features_v1_1: Vulkan11Features,
pub features_v1_2: Vulkan12Features,
pub handle: PhysicalDevice,
pub instance: Instance,
pub memory_properties: PhysicalDeviceMemoryProperties,
pub properties_v1_0: Vulkan10Properties,
pub properties_v1_1: Vulkan11Properties,
pub properties_v1_2: Vulkan12Properties,
pub queue_families: Box<[QueueFamilyProperties]>,
pub vk_khr_ray_tracing_pipeline: Option<RayTracingPipeline>,
pub sampler_filter_minmax_properties: SamplerFilterMinmaxProperties,
pub vk_ext_index_type_uint8: bool,
pub vk_ext_private_data: bool,
pub vk_khr_acceleration_structure: Option<AccelerationStructure>,
pub vk_khr_present_id: Option<PresentId>,
pub vk_khr_present_wait: Option<PresentWait>,
pub vk_khr_ray_query: bool,
pub vk_khr_swapchain: bool,
pub vk_khr_synchronization2: bool,
/* private fields */
}Expand description
Structure which holds data about a physical device.
Extension support is exposed through fields named after Vulkan extension names. Extensions that
only need a support check are booleans, such as Self::vk_ext_private_data and
Self::vk_khr_swapchain. Extensions with feature or property data are Option fields, such
as Self::vk_khr_acceleration_structure and Self::vk_khr_ray_tracing_pipeline.
Use Device::physical for the selected physical device of a
logical device.
See VkPhysicalDevice.
Fields§
§depth_stencil_resolve_properties: DepthStencilResolvePropertiesDescribes the properties of the device which relate to depth/stencil resolve operations.
Note: This field is read-only.
features_v1_0: Vulkan10FeaturesDescribes the features of the physical device which are part of the Vulkan 1.0 base feature set.
Note: This field is read-only.
features_v1_1: Vulkan11FeaturesDescribes the features of the physical device which are part of the Vulkan 1.1 base feature set.
Note: This field is read-only.
features_v1_2: Vulkan12FeaturesDescribes the features of the physical device which are part of the Vulkan 1.2 base feature set.
Note: This field is read-only.
handle: PhysicalDeviceThe native Vulkan resource handle of this physical device.
Note: This field is read-only.
instance: InstanceThe Vulkan instance which owns this device.
Note: This field is read-only.
memory_properties: PhysicalDeviceMemoryPropertiesMemory properties of the physical device.
Note: This field is read-only.
properties_v1_0: Vulkan10PropertiesDevice properties of the physical device which are part of the Vulkan 1.0 base property set.
Note: This field is read-only.
properties_v1_1: Vulkan11PropertiesDescribes the properties of the physical device which are part of the Vulkan 1.1 base property set.
Note: This field is read-only.
properties_v1_2: Vulkan12PropertiesDescribes the properties of the physical device which are part of the Vulkan 1.2 base property set.
Note: This field is read-only.
queue_families: Box<[QueueFamilyProperties]>Describes the queues offered by this physical device.
Note: This field is read-only.
vk_khr_ray_tracing_pipeline: Option<RayTracingPipeline>VK_KHR_ray_tracing_pipeline features and properties, when supported.
Note: This field is read-only.
sampler_filter_minmax_properties: SamplerFilterMinmaxPropertiesDescribes the properties of the device which relate to min/max sampler filtering.
Note: This field is read-only.
vk_ext_index_type_uint8: boolWhether VK_EXT_index_type_uint8 support is available.
Note: This field is read-only.
vk_ext_private_data: boolWhether VK_EXT_private_data support is available.
Note: This field is read-only.
vk_khr_acceleration_structure: Option<AccelerationStructure>VK_KHR_acceleration_structure features and properties, when supported.
Note: This field is read-only.
vk_khr_present_id: Option<PresentId>VK_KHR_present_id features, when supported.
Note: This field is read-only.
vk_khr_present_wait: Option<PresentWait>VK_KHR_present_wait features, when supported.
Note: This field is read-only.
vk_khr_ray_query: boolWhether VK_KHR_ray_query support is available.
Note: This field is read-only.
vk_khr_swapchain: boolWhether VK_KHR_swapchain support is available.
Note: This field is read-only.
vk_khr_synchronization2: boolWhether synchronization2 support is available through Vulkan 1.3 core or
VK_KHR_synchronization2.
Note: This field is read-only.
Implementations§
Source§impl PhysicalDevice
impl PhysicalDevice
Sourcepub unsafe fn create_ash_device<F>(&self, create_fn: F) -> VkResult<Device>
pub unsafe fn create_ash_device<F>(&self, create_fn: F) -> VkResult<Device>
Prepares device creation information and calls the provided callback to allow an application to control the device creation process.
Note: This is only useful for interoperating with other libraries as device creation is
normally handled by the Device::try_from_display and Device::create
functions.
§Safety
This comes with all the caveats of using ash builder types, which are inherently
dangerous. Use with extreme caution.
See VkDeviceCreateInfo.
Sourcepub fn format_properties(&self, format: Format) -> FormatProperties
pub fn format_properties(&self, format: Format) -> FormatProperties
Lists the capabilities of a given format.
Sourcepub fn image_format_properties(
&self,
format: Format,
image_type: ImageType,
tiling: ImageTiling,
usage: ImageUsageFlags,
flags: ImageCreateFlags,
) -> Result<Option<ImageFormatProperties>, DriverError>
pub fn image_format_properties( &self, format: Format, image_type: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, ) -> Result<Option<ImageFormatProperties>, DriverError>
Lists the physical device’s image format capabilities.
A result of None indicates the format is not supported.
Sourcepub unsafe fn try_from_ash(
instance: &Instance,
physical_device: PhysicalDevice,
) -> Result<Self, DriverError>
pub unsafe fn try_from_ash( instance: &Instance, physical_device: PhysicalDevice, ) -> Result<Self, DriverError>
Creates a physical device wrapper which reports features and properties.
§Safety
physical_device must be a valid handle enumerated from instance, and it must remain
valid for the lifetime of the returned wrapper.
Sourcepub fn try_into_device(self) -> Result<Device, DriverError>
pub fn try_into_device(self) -> Result<Device, DriverError>
Creates a logical Device from this selected physical device.
Trait Implementations§
Source§impl Clone for PhysicalDevice
impl Clone for PhysicalDevice
Source§fn clone(&self) -> PhysicalDevice
fn clone(&self) -> PhysicalDevice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more