logo
pub struct PhysicalDevice { /* private fields */ }
Expand description

Represents one of the available physical devices on this machine.

Example

use vulkano::device::physical::PhysicalDevice;

for physical_device in instance.enumerate_physical_devices().unwrap() {
    print_infos(&physical_device);
}

fn print_infos(dev: &PhysicalDevice) {
    println!("Name: {}", dev.properties().device_name);
}

Implementations

Creates a new PhysicalDevice from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from instance.

Returns the instance that owns the physical device.

Returns the version of Vulkan supported by the physical device.

Unlike the api_version property, which is the version reported by the device directly, this function returns the version the device can actually support, based on the instance’s max_api_version.

Returns the properties reported by the physical device.

Returns the extension properties reported by the physical device.

Returns the extensions that are supported by the physical device.

Returns the features that are supported by the physical device.

Returns the memory properties reported by the physical device.

Returns the queue family properties reported by the physical device.

Queries whether the physical device supports presenting to DirectFB surfaces from queues of the given queue family.

Safety
  • dfb must be a valid DirectFB IDirectFB handle.

Retrieves the external memory properties supported for buffers with a given configuration.

Instance API version must be at least 1.1, or the khr_external_memory_capabilities extension must be enabled on the instance.

Retrieves the external handle properties supported for fences with a given configuration.

The instance API version must be at least 1.1, or the khr_external_fence_capabilities extension must be enabled on the instance.

Retrieves the external handle properties supported for semaphores with a given configuration.

The instance API version must be at least 1.1, or the khr_external_semaphore_capabilities extension must be enabled on the instance.

Retrieves the properties of a format when used by this physical device.

Returns the properties supported for images with a given image configuration.

Some is returned if the configuration is supported, None if it is not.

Panics
  • Panics if image_format_info.format is None.

Queries whether the physical device supports presenting to QNX Screen surfaces from queues of the given queue family.

Safety
  • window must be a valid QNX Screen _screen_window handle.

Returns the properties of sparse images with a given image configuration.

Panics
  • Panics if format_info.format is None.

Returns the capabilities that are supported by the physical device for the given surface.

Panic
  • Panics if the physical device and the surface don’t belong to the same instance.

Returns the combinations of format and color space that are supported by the physical device for the given surface.

Panic
  • Panics if the physical device and the surface don’t belong to the same instance.

Returns the present modes that are supported by the physical device for the given surface.

Panic
  • Panics if the physical device and the surface don’t belong to the same instance.

Returns whether queues of the given queue family can draw on the given surface.

Retrieves the properties of tools that are currently active on the physical device.

These properties may change during runtime, so this function only returns the current situation.

The physical device API version must be at least 1.3, or the ext_tooling_info extension must be supported by the physical device.

Queries whether the physical device supports presenting to Wayland surfaces from queues of the given queue family.

Safety
  • display must be a valid Wayland wl_display handle.

Queries whether the physical device supports presenting to Win32 surfaces from queues of the given queue family.

Queries whether the physical device supports presenting to XCB surfaces from queues of the given queue family.

Safety
  • connection must be a valid X11 xcb_connection_t handle.

Queries whether the physical device supports presenting to Xlib surfaces from queues of the given queue family.

Safety
  • display must be a valid Xlib Display handle.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns a reference to the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.