Struct vulkano::device::DeviceCreateInfo
source · 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
impl Clone for DeviceCreateInfo
source§fn clone(&self) -> DeviceCreateInfo
fn clone(&self) -> DeviceCreateInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more