Trait PhysicalDevice

Source
pub trait PhysicalDevice: VkHandle<Handle = VkPhysicalDevice> + InstanceChild {
Show 29 methods // Provided methods fn layer_property_count(&self) -> Result<u32> { ... } fn enumerate_layer_properties( &self, sink: &mut [MaybeUninit<VkLayerProperties>], ) -> Result<u32> { ... } fn enumerate_layer_properties_alloc(&self) -> Result<Vec<VkLayerProperties>> { ... } fn extension_property_count_cstr( &self, layer_name: Option<&CStr>, ) -> Result<u32> { ... } fn enumerate_extension_properties_cstr( &self, layer_name: Option<&CStr>, sink: &mut [MaybeUninit<VkExtensionProperties>], ) -> Result<u32> { ... } fn enumerate_extension_properties_cstr_alloc( &self, layer_name: Option<&CStr>, ) -> Result<Vec<VkExtensionProperties>> { ... } fn enumerate_extension_properties( &self, layer_name: Option<&str>, ) -> Result<Vec<VkExtensionProperties>> { ... } fn features(&self) -> VkPhysicalDeviceFeatures { ... } unsafe fn features2_khr( &self, sink: &mut MaybeUninit<VkPhysicalDeviceFeatures2KHR>, ) where Self::ConcreteInstance: InstanceGetPhysicalDeviceProperties2Extension { ... } fn properties(&self) -> VkPhysicalDeviceProperties { ... } unsafe fn properties2_khr( &self, sink: &mut MaybeUninit<VkPhysicalDeviceProperties2KHR>, ) where Self::ConcreteInstance: InstanceGetPhysicalDeviceProperties2Extension { ... } fn format_properties(&self, format: VkFormat) -> VkFormatProperties { ... } unsafe fn format_properties2_khr( &self, format: VkFormat, out: &mut MaybeUninit<VkFormatProperties2KHR>, ) where Self::ConcreteInstance: InstanceGetPhysicalDeviceProperties2Extension { ... } fn image_format_properties( &self, format: VkFormat, itype: VkImageType, tiling: VkImageTiling, usage: ImageUsageFlags, flags: ImageFlags, ) -> Result<VkImageFormatProperties> { ... } fn queue_family_property_count(&self) -> u32 { ... } fn queue_family_properties( &self, sink: &mut [MaybeUninit<VkQueueFamilyProperties>], ) -> u32 { ... } fn queue_family_properties_alloc(&self) -> QueueFamilies { ... } fn memory_properties(&self) -> MemoryProperties { ... } fn sparse_image_format_property_count( &self, format: VkFormat, image_type: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, ) -> u32 { ... } fn sparse_image_format_properties( &self, format: VkFormat, image_type: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, sink: &mut [MaybeUninit<VkSparseImageFormatProperties>], ) -> u32 { ... } fn sparse_image_format_properties_alloc( &self, format: VkFormat, itype: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, ) -> Vec<VkSparseImageFormatProperties> { ... } fn surface_support( &self, queue_family: u32, surface: &(impl Surface + ?Sized), ) -> Result<bool> { ... } fn surface_capabilities( &self, surface: &(impl Surface + ?Sized), ) -> Result<VkSurfaceCapabilitiesKHR> { ... } fn surface_format_count( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), ) -> Result<u32> { ... } fn surface_formats( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), sink: &mut [MaybeUninit<VkSurfaceFormatKHR>], ) -> Result<u32> { ... } fn surface_formats_alloc( &self, surface: &(impl Surface + ?Sized), ) -> Result<Vec<VkSurfaceFormatKHR>> { ... } fn surface_present_mode_count( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), ) -> Result<u32> { ... } fn surface_present_modes( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), sink: &mut [MaybeUninit<PresentMode>], ) -> Result<u32> { ... } fn surface_present_modes_alloc( &self, surface: &(impl Surface + ?Sized), ) -> Result<Vec<PresentMode>> { ... }
}
Expand description

A PhysicalDevice interface

Provided Methods§

Source

fn layer_property_count(&self) -> Result<u32>

Returns a count of properties of available physical device layers

§Failures

On failure, this command returns

Source

fn enumerate_layer_properties( &self, sink: &mut [MaybeUninit<VkLayerProperties>], ) -> Result<u32>

Returns properties of available physical device layers

§Failures

On failure, this command returns

Source

fn enumerate_layer_properties_alloc(&self) -> Result<Vec<VkLayerProperties>>

Returns properties of available physical device layers

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
Source

fn extension_property_count_cstr( &self, layer_name: Option<&CStr>, ) -> Result<u32>

Returns a count of properties of available physical device extensions

§Failures

On failure, this command returns

Source

fn enumerate_extension_properties_cstr( &self, layer_name: Option<&CStr>, sink: &mut [MaybeUninit<VkExtensionProperties>], ) -> Result<u32>

Returns properties of available physical device extensions

§Failures

On failure, this command returns

Source

fn enumerate_extension_properties_cstr_alloc( &self, layer_name: Option<&CStr>, ) -> Result<Vec<VkExtensionProperties>>

Returns properties of available physical device extensions

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_LAYER_NOT_PRESENT
Source

fn enumerate_extension_properties( &self, layer_name: Option<&str>, ) -> Result<Vec<VkExtensionProperties>>

Returns properties of available physical device extensions

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_LAYER_NOT_PRESENT
Source

fn features(&self) -> VkPhysicalDeviceFeatures

Reports capabilities of a physical device.

Source

unsafe fn features2_khr( &self, sink: &mut MaybeUninit<VkPhysicalDeviceFeatures2KHR>, )

Reports capabilities of a physical device

§Safety

Caller must guarantee that all write operations to sink and its pNext fields are safe

Source

fn properties(&self) -> VkPhysicalDeviceProperties

Returns properties of a physical device

Source

unsafe fn properties2_khr( &self, sink: &mut MaybeUninit<VkPhysicalDeviceProperties2KHR>, )

Returns properties of a physical device

§Safety

Caller must guarantee that all write operations to sink and its pNext fields are safe

Source

fn format_properties(&self, format: VkFormat) -> VkFormatProperties

Lists physical device’s format capabilities

Source

unsafe fn format_properties2_khr( &self, format: VkFormat, out: &mut MaybeUninit<VkFormatProperties2KHR>, )

Lists physical device’s format capabilities

§Safety

Caller must guarantee that all write operations to out are safe.

Source

fn image_format_properties( &self, format: VkFormat, itype: VkImageType, tiling: VkImageTiling, usage: ImageUsageFlags, flags: ImageFlags, ) -> Result<VkImageFormatProperties>

Lists physical device’s image format capabilities

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_FORMAT_NOT_SUPPORTED
Source

fn queue_family_property_count(&self) -> u32

Reports a count of properties of the queues of the specified physical device

Source

fn queue_family_properties( &self, sink: &mut [MaybeUninit<VkQueueFamilyProperties>], ) -> u32

Reports properties of the queues of the specified physical device

Source

fn queue_family_properties_alloc(&self) -> QueueFamilies

Reports properties of the queues of the specified physical device

Source

fn memory_properties(&self) -> MemoryProperties

Reports memory information for the specified physical device

Source

fn sparse_image_format_property_count( &self, format: VkFormat, image_type: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, ) -> u32

Retrieve a count of properties of an image format spplied to sparse images

Source

fn sparse_image_format_properties( &self, format: VkFormat, image_type: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, sink: &mut [MaybeUninit<VkSparseImageFormatProperties>], ) -> u32

Retrieve properties of an image format applied to sparse images

Source

fn sparse_image_format_properties_alloc( &self, format: VkFormat, itype: VkImageType, samples: VkSampleCountFlags, usage: ImageUsageFlags, tiling: VkImageTiling, ) -> Vec<VkSparseImageFormatProperties>

Retrieve properties of an image format applied to sparse images

Source

fn surface_support( &self, queue_family: u32, surface: &(impl Surface + ?Sized), ) -> Result<bool>

Query if presentation is supported

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_capabilities( &self, surface: &(impl Surface + ?Sized), ) -> Result<VkSurfaceCapabilitiesKHR>

Query surface capabilities

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_format_count( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), ) -> Result<u32>

Query a count of color formats supported by surface

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_formats( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), sink: &mut [MaybeUninit<VkSurfaceFormatKHR>], ) -> Result<u32>

Query a count of color formats supported by surface

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_formats_alloc( &self, surface: &(impl Surface + ?Sized), ) -> Result<Vec<VkSurfaceFormatKHR>>

Query color formats supported by surface

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_present_mode_count( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), ) -> Result<u32>

Query a count of supported presentation modes

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_present_modes( &self, surface: &(impl VkHandle<Handle = VkSurfaceKHR> + ?Sized), sink: &mut [MaybeUninit<PresentMode>], ) -> Result<u32>

Query supported presentation modes

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR
Source

fn surface_present_modes_alloc( &self, surface: &(impl Surface + ?Sized), ) -> Result<Vec<PresentMode>>

Query supported presentation modes

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'s, T> PhysicalDevice for &'s T
where T: PhysicalDevice + ?Sized,

Source§

impl<'s, T> PhysicalDevice for &'s mut T
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for Box<T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for Rc<T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for Arc<T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for Ref<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for RefMut<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for ManuallyDrop<T>
where T: PhysicalDevice,

Source§

impl<T> PhysicalDevice for MutexGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for RwLockReadGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for RwLockWriteGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for MappedMutexGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for MutexGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for MappedRwLockReadGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for MappedRwLockWriteGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for RwLockReadGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Source§

impl<T> PhysicalDevice for RwLockWriteGuard<'_, T>
where T: PhysicalDevice + ?Sized,

Implementors§