logo
pub struct DeviceBuilder<'a> { /* private fields */ }
Expand description

Allows to easily create an erupt::DeviceLoader and queues.

Implementations

Create a new device builder.

Create a new device builder with a custom DeviceLoaderBuilder.

Specify a custom queue setup.

Default setup
|physical_device, queue_family_criteria, queue_family_properties| {
    let mut queue_setup = HashSet::with_capacity(queue_family_criteria.len());
    for queue_family_criteria in queue_family_criteria {
        match queue_family_criteria.choose_queue_family(
            instance,
            physical_device,
            queue_family_properties,
            surface,
        )? {
            Some((idx, _properties)) => {
                queue_setup.insert(QueueSetup::simple(idx, 1));
            }
            None => return Ok(None),
        }
    }

    Ok(Some(queue_setup))
}

Allows to specify custom criteria for a physical device. This can for example be used to check for limits.

Surface to use to check for presentation support in queue families.

Prioritise devices of these types when choosing a device. The further ahead, the higher the priority.

The queue family chosen by the criteria will be enabled on the device.

Prefer a device which has at least one DEVICE_LOCAL memory heap with a minimum of size bytes of memory.

Require a device which has at least one DEVICE_LOCAL memory heap with a minimum of size bytes of memory.

Prefer a device which supports extension. The extension will only be enabled if it’s supported.

Require a device which supports extension. The extension will be enabled.

Prefer a device which supports this version.

Prefer a device which supports this version.

Require the device to support this version.

Require the device to support this version.

Require these features to be present for the device. The elements of the pointer chain will only be considered if possible. The features will be enabled.

Skip the selection logic and always select the physical device at the specified index.

Allocation callback to use for internal Vulkan calls in the builder.

Returns the erupt::DeviceLoader and DeviceMetadata, containing the handle of the used physical device handle and its properties, as wells as the enabled device extensions and used queue setups.

Trait Implementations

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

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

Performs the conversion.

Performs the conversion.

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.