Struct erupt_bootstrap::device::QueueFamilyCriteria
source · [−]pub struct QueueFamilyCriteria {
pub must_support: QueueFlags,
pub should_support: QueueFlags,
pub must_not_support: QueueFlags,
pub should_not_support: QueueFlags,
pub presentation_support: Option<bool>,
}Expand description
Criteria for queue families.
Fields
must_support: QueueFlagsA queue family will only be considered if all these flags are set.
should_support: QueueFlagsA queue family will be preferred over other ones if all these flags are set. The more of these flags are set, the more likely it is for the queue family to be chosen.
must_not_support: QueueFlagsA queue family will only be considered if none of these flags are set.
should_not_support: QueueFlagsA queue family will be preferred over other ones if none of these flags are set. The less of these flags are set, the more likely it is for the queue family to be chosen.
presentation_support: Option<bool>This criteria is only met if the presentation support matches with
this flag. None corresponds to being indifferent to the support.
Some(expected) corresponds to the criteria being met if the support
matches with expected.
Implementations
Queue family criteria that are always met.
The criteria are only met if the queue family supports graphics and presentation.
Tries to match the queue family that’s the closest to being a pure transfer queue.
Add an requirement that these queue flags must be present in the queue family.
Add an recommendation that these queue flags should be present in the queue family.
Add an requirement that these queue flags must not be present in the queue family.
Add an recommendation that these queue flags should not be present in the queue family.
Require that the queue family must support presentation.
Require that the queue family must not support presentation.
pub fn choose_queue_family<'a>(
&self,
instance: &InstanceLoader,
physical_device: PhysicalDevice,
queue_family_properties: &'a [QueueFamilyProperties],
surface: Option<SurfaceKHR>
) -> Result<Option<(u32, &'a QueueFamilyProperties)>, Result>
pub fn choose_queue_family<'a>(
&self,
instance: &InstanceLoader,
physical_device: PhysicalDevice,
queue_family_properties: &'a [QueueFamilyProperties],
surface: Option<SurfaceKHR>
) -> Result<Option<(u32, &'a QueueFamilyProperties)>, Result>
Returns the index of the best suited queue family.
Returns Ok(None) when no queue family meets the criteria.
Returns Err(_) when an internal Vulkan call failed.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for QueueFamilyCriteria
impl Send for QueueFamilyCriteria
impl Sync for QueueFamilyCriteria
impl Unpin for QueueFamilyCriteria
impl UnwindSafe for QueueFamilyCriteria
Blanket Implementations
Mutably borrows from an owned value. Read more