pub struct DeviceCreateInfo {
    pub queue_create_infos: Vec<QueueCreateInfo>,
    pub enabled_extensions: DeviceExtensions,
    pub enabled_features: Features,
    pub physical_devices: SmallVec<[Arc<PhysicalDevice>; 2]>,
    pub private_data_slot_request_count: u32,
    pub _ne: NonExhaustive,
}
Expand description

Parameters to create a new Device.

Fields§

§queue_create_infos: Vec<QueueCreateInfo>

The queues to create for the device.

The default value is empty, which must be overridden.

§enabled_extensions: DeviceExtensions

The extensions to enable on the device.

You only need to enable the extensions that you need. If the extensions you specified require additional extensions to be enabled, they will be automatically enabled as well.

If the khr_portability_subset extension is available, it will be enabled automatically, so you do not have to do this yourself. You are responsible for ensuring that your program can work correctly on such devices. See the documentation of the instance module for more information.

The default value is DeviceExtensions::empty().

§enabled_features: Features

The features to enable on the device.

You only need to enable the features that you need. If the extensions you specified require certain features to be enabled, they will be automatically enabled as well.

The default value is Features::empty().

§physical_devices: SmallVec<[Arc<PhysicalDevice>; 2]>

A list of physical devices to create this device from, to act together as a single logical device. The physical devices must all belong to the same device group, as returned by Instance::enumerate_physical_device_groups, and a physical device must not appear in the list more than once.

The index of each physical device in this list becomes that physical device’s device index, which can be used in other Vulkan functions to specify a particular physical device within the group. If the list is left empty, then it behaves as if it contained the physical device, that was passed to the physical_device parameter of Device::new, as its only element. Otherwise, that physical device must always be part of the list, but it does not need to be the first element.

If the list contains more than one physical device, the instance API version must be at least 1.1, or the khr_device_group_creation extension must be enabled on the instance. In order to use any device-level functionality for dealing with device groups, the physical device API version should also be at least 1.1, or enabled_extensions should contain khr_device_group.

The default value is empty.

§private_data_slot_request_count: u32

The number of private data slots to reserve when creating the device.

This is purely an optimization, and it is not necessary to do this in order to use private data slots, but it may improve performance.

If not zero, the physical device API version must be at least 1.3, or enabled_extensions must contain ext_private_data.

The default value is 0.

§_ne: NonExhaustive

Trait Implementations§

source§

impl Clone for DeviceCreateInfo

source§

fn clone(&self) -> DeviceCreateInfo

Returns a copy 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 Debug for DeviceCreateInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DeviceCreateInfo

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.