Struct PhysicalDeviceObject

Source
pub struct PhysicalDeviceObject<Owner: Instance>(/* private fields */);
Expand description

Opaque handle to a physical device object

§Platform Dependent Methods: Presentation Support checking functions

  • xlib_presentation_support(&self, queue_family: u32, display: *mut x11::xlib::Display, visual: x11::xlib::VisualID) -> bool: VK_KHR_xlib_surface
  • xcb_presentation_support(&self, queue_family: u32, connection: *mut xcb::ffi::xcb_connection_t, visual: xcb::ffi::xcb_visualid_t) -> bool: VK_KHR_xcb_surface
  • wayland_presentation_support(&self, queue_family: u32, display: *mut wayland_client::sys::wl_display) -> bool: VK_KHR_wayland_surface
  • win32_presentation_support(&self, queue_family: u32) -> bool: VK_KHR_win32_surface
  • Methods for Android and Mir surfaces are not implemented

Implementations§

Source§

impl<Owner: Instance> PhysicalDeviceObject<Owner>

Source

pub const unsafe fn manage(handle: VkPhysicalDevice, owner: Owner) -> Self

Source

pub const fn unmanage(self) -> (VkPhysicalDevice, Owner)

Source§

impl<Owner: Instance + Clone> PhysicalDeviceObject<&Owner>

Source

pub fn clone_parent(&self) -> PhysicalDeviceObject<Owner>

Split the lifetime from owner by cloning it.

Trait Implementations§

Source§

impl<Owner: Clone + Instance> Clone for PhysicalDeviceObject<Owner>

Source§

fn clone(&self) -> PhysicalDeviceObject<Owner>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Owner: Instance> InstanceChild for PhysicalDeviceObject<Owner>

Source§

impl<Owner: Instance> InstanceChildTransferrable for PhysicalDeviceObject<Owner>

Source§

impl<Owner: Instance> PhysicalDevice for PhysicalDeviceObject<Owner>

Source§

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

Available on crate feature Implements only.
Returns a count of properties of available physical device layers Read more
Source§

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

Available on crate feature Implements only.
Returns properties of available physical device layers Read more
Source§

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

Available on crate features Implements and alloc only.
Returns properties of available physical device layers Read more
Source§

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

Available on crate feature Implements only.
Returns a count of properties of available physical device extensions Read more
Source§

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

Available on crate feature Implements only.
Returns properties of available physical device extensions Read more
Source§

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

Available on crate features Implements and alloc only.
Returns properties of available physical device extensions Read more
Source§

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

Available on crate features Implements and alloc only.
Returns properties of available physical device extensions Read more
Source§

fn features(&self) -> VkPhysicalDeviceFeatures

Available on crate feature Implements only.
Reports capabilities of a physical device.
Source§

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

Available on crate feature Implements only.
Lists physical device’s format capabilities
Source§

unsafe fn format_properties2( &self, format: VkFormat, out: &mut VkFormatProperties2KHR, )

Available on crate features Implements and Allow1_1APIs only.
Lists physical device’s format capabilities Read more
Source§

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

Available on crate feature Implements only.
Lists physical device’s image format capabilities Read more
Source§

fn properties(&self) -> VkPhysicalDeviceProperties

Available on crate feature Implements only.
Returns properties of a physical device
Source§

fn queue_family_property_count(&self) -> u32

Available on crate feature Implements only.
Reports a count of properties of the queues of the specified physical device
Source§

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

Available on crate feature Implements only.
Reports properties of the queues of the specified physical device
Source§

fn queue_family_properties_alloc(&self) -> QueueFamilies

Available on crate feature Implements only.
Reports properties of the queues of the specified physical device
Source§

fn memory_properties(&self) -> MemoryProperties

Available on crate feature Implements only.
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

Available on crate feature Implements only.
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 [VkSparseImageFormatProperties], ) -> u32

Available on crate feature Implements only.
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>

Available on crate feature Implements only.
Retrieve properties of an image format applied to sparse images
Source§

unsafe fn multisample_properties( &self, samples: VkSampleCountFlags, sink: &mut MaybeUninit<VkMultisamplePropertiesEXT>, )

Available on crate features Implements and VK_EXT_sample_locations only.
Safety Read more
Source§

unsafe fn external_fence_properties( &self, info: &VkPhysicalDeviceExternalFenceInfoKHR, sink: &mut MaybeUninit<VkExternalFencePropertiesKHR>, )

Available on crate features Implements and VK_KHR_external_fence_capabilities only.
Function for querying external fence handle capabilities Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query if presentation is supported Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query surface capabilities Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query a count of color formats supported by surface Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query a count of color formats supported by surface Read more
Source§

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

Available on crate features Implements and VK_KHR_surface and alloc only.
Query color formats supported by surface Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query a count of supported presentation modes Read more
Source§

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

Available on crate features Implements and VK_KHR_surface only.
Query supported presentation modes Read more
Source§

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

Available on crate features Implements and VK_KHR_surface and alloc only.
Query supported presentation modes Read more
Source§

unsafe fn xlib_presentation_support( &self, queue_family: u32, display: *mut Display, visual: VisualID, ) -> bool

Available on crate features Implements and VK_KHR_xlib_surface only.
Query physical device for presentation to X11 server using Xlib Read more
Source§

unsafe fn xcb_presentation_support( &self, queue_family: u32, connection: *mut xcb_connection_t, visual: Visualid, ) -> bool

Available on crate features Implements and VK_KHR_xcb_surface only.
Query physical device for presentation to X11 server using XCB Read more
Source§

unsafe fn wayland_presentation_support( &self, queue_family: u32, display: *mut c_void, ) -> bool

Available on crate features Implements and VK_KHR_wayland_surface only.
Query physical device for presentation to Wayland Read more
Source§

fn display_mode_property_count(&self, display: VkDisplayKHR) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query a count of the set of mode properties supported by the display Read more
Source§

fn display_mode_properties( &self, display: VkDisplayKHR, sink: &mut [VkDisplayModePropertiesKHR], ) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query the set of mode properties supported by the display Read more
Source§

fn display_mode_properties_alloc( &self, display: VkDisplayKHR, ) -> Result<Vec<VkDisplayModePropertiesKHR>>

Available on crate features Implements and VK_KHR_display and alloc only.
Query the set of mode properties supported by the display Read more
Source§

unsafe fn new_display_mode_raw( &self, display: VkDisplayKHR, info: &VkDisplayModeCreateInfoKHR, allocation_callbacks: Option<&VkAllocationCallbacks>, ) -> Result<VkDisplayModeKHR>

Available on crate features Implements and VK_KHR_display only.
Create a display mode Read more
Source§

fn display_plane_capabilities( &self, mode: VkDisplayModeKHR, plane_index: u32, ) -> Result<VkDisplayPlaneCapabilitiesKHR>

Available on crate features Implements and VK_KHR_display only.
Query capabilities of a mode and plane combination Read more
Source§

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

Available on crate features Implements and VK_KHR_display only.
Query a count of information about the available displays Read more
Source§

fn display_properties(&self, sink: &mut [VkDisplayPropertiesKHR]) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query information about the available displays Read more
Source§

fn display_properties_alloc( &self, ) -> Result<Vec<DisplayPropertiesWithPhysicalDeviceRef<&Self>>>

Available on crate features Implements and VK_KHR_display and alloc only.
Query information about the available displays. Read more
Source§

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

Available on crate features Implements and VK_KHR_display only.
Query a count of the plane properties Read more
Source§

fn display_plane_properties( &self, sink: &mut [VkDisplayPlanePropertiesKHR], ) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query the plane properties Read more
Source§

fn display_plane_properties_alloc( &self, ) -> Result<Vec<DisplayPlanePropertiesWithPhysicalDeviceRef<&Self>>>

Available on crate features Implements and VK_KHR_display and alloc only.
Query the plane properties. Read more
Source§

fn display_plane_supported_display_count(&self, plane_index: u32) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query a count of the list of displays a plane supports Read more
Source§

fn display_plane_supported_displays( &self, plane_index: u32, sink: &mut [VkDisplayKHR], ) -> Result<u32>

Available on crate features Implements and VK_KHR_display only.
Query the list of displays a plane supports Read more
Source§

fn display_plane_supported_displays_alloc( &self, plane_index: u32, ) -> Result<Vec<Display<&Self>>>

Available on crate features Implements and VK_KHR_display and alloc only.
Query the list of displays a plane supports. Read more
Source§

unsafe fn new_surface_for_display_plane_raw( &self, info: &VkDisplaySurfaceCreateInfoKHR, allocation_callbacks: Option<&VkAllocationCallbacks>, ) -> Result<VkSurfaceKHR>

Available on crate features Implements and VK_KHR_display and VK_KHR_surface only.
Create a Surface object representing a display plane and mode Read more
Source§

unsafe fn get_randr_output_display( self, dpy: *mut Display, rr_output: RROutput, ) -> Result<Display<Self>>

Available on crate features Implements and VK_EXT_acquire_xlib_display only.
Query the VkDisplayKHR corresponding to an X11 RandR Output Read more
Source§

unsafe fn surface_capabilities2( &self, surface_info: &VkPhysicalDeviceSurfaceInfo2KHR, sink: &mut MaybeUninit<VkSurfaceCapabilities2KHR>, ) -> Result<()>

Available on crate features Implements and VK_KHR_get_surface_capabilities2 only.
Reports capabilities of a surface on a physical device Read more
Source§

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

Available on crate features Implements and Allow1_1APIs only.
Returns properties of a physical device Read more
Source§

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

Available on crate features Implements and Allow1_1APIs only.
Reports capabilities of a physical device Read more
Source§

fn surface_present_mode2_count( &self, surface_info: &VkPhysicalDeviceSurfaceInfo2KHR, ) -> Result<u32>

Available on crate features Implements and VK_EXT_full_screen_exclusive only.
Query a count of supported presentation modes Read more
Source§

fn surface_present_modes2( &self, surface_info: &VkPhysicalDeviceSurfaceInfo2KHR, sink: &mut [VkPresentModeKHR], ) -> Result<u32>

Available on crate features Implements and VK_EXT_full_screen_exclusive only.
Query supported presentation modes Read more
Source§

fn surface_present_modes2_alloc( &self, surface_info: &VkPhysicalDeviceSurfaceInfo2KHR, ) -> Result<Vec<VkPresentModeKHR>>

Available on crate features Implements and VK_EXT_full_screen_exclusive and alloc only.
Query supported presentation modes. Read more
Source§

impl<Owner: Instance> VkHandle for PhysicalDeviceObject<Owner>

Source§

type Handle = VkPhysicalDevice

Source§

fn native_ptr(&self) -> Self::Handle

Retrieve an underlying handle
Source§

fn as_transparent_ref(&self) -> VkHandleRef<'_, Self::Handle>

Source§

impl<Owner: Instance> VkHandleMut for PhysicalDeviceObject<Owner>

Source§

fn native_ptr_mut(&mut self) -> Self::Handle

Retrieve an underlying mutable handle
Source§

fn as_transparent_ref_mut(&mut self) -> VkHandleRefMut<'_, Self::Handle>

Source§

impl<Owner: Instance> VkObject for PhysicalDeviceObject<Owner>

Source§

impl<Owner: Instance + Send> Send for PhysicalDeviceObject<Owner>

Source§

impl<Owner: Instance + Sync> Sync for PhysicalDeviceObject<Owner>

Auto Trait Implementations§

§

impl<Owner> Freeze for PhysicalDeviceObject<Owner>
where Owner: Freeze,

§

impl<Owner> RefUnwindSafe for PhysicalDeviceObject<Owner>
where Owner: RefUnwindSafe,

§

impl<Owner> Unpin for PhysicalDeviceObject<Owner>
where Owner: Unpin,

§

impl<Owner> UnwindSafe for PhysicalDeviceObject<Owner>
where Owner: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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> VkHandleExt for T
where T: VkHandle,

Source§

fn eq_handle(&self, other: &Self) -> bool
where Self::Handle: VkRawHandle,

Checks the equality between vulkan objects by their handle value.