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§
Source§impl QueueFamilyCriteria
impl QueueFamilyCriteria
Sourcepub fn none() -> QueueFamilyCriteria
pub fn none() -> QueueFamilyCriteria
Queue family criteria that are always met.
Sourcepub fn graphics_present() -> QueueFamilyCriteria
pub fn graphics_present() -> QueueFamilyCriteria
The criteria are only met if the queue family supports graphics and presentation.
Sourcepub fn preferably_separate_transfer() -> QueueFamilyCriteria
pub fn preferably_separate_transfer() -> QueueFamilyCriteria
Tries to match the queue family that’s the closest to being a pure transfer queue.
Sourcepub fn must_support(self, must_support: QueueFlags) -> QueueFamilyCriteria
pub fn must_support(self, must_support: QueueFlags) -> QueueFamilyCriteria
Add an requirement that these queue flags must be present in the queue family.
Sourcepub fn should_support(self, should_support: QueueFlags) -> QueueFamilyCriteria
pub fn should_support(self, should_support: QueueFlags) -> QueueFamilyCriteria
Add an recommendation that these queue flags should be present in the queue family.
Sourcepub fn must_not_support(
self,
must_not_support: QueueFlags,
) -> QueueFamilyCriteria
pub fn must_not_support( self, must_not_support: QueueFlags, ) -> QueueFamilyCriteria
Add an requirement that these queue flags must not be present in the queue family.
Sourcepub fn should_not_support(
self,
should_not_support: QueueFlags,
) -> QueueFamilyCriteria
pub fn should_not_support( self, should_not_support: QueueFlags, ) -> QueueFamilyCriteria
Add an recommendation that these queue flags should not be present in the queue family.
Sourcepub fn must_support_presentation(self) -> QueueFamilyCriteria
pub fn must_support_presentation(self) -> QueueFamilyCriteria
Require that the queue family must support presentation.
Sourcepub fn must_not_support_presentation(self) -> QueueFamilyCriteria
pub fn must_not_support_presentation(self) -> QueueFamilyCriteria
Require that the queue family must not support presentation.
Sourcepub 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§
Source§impl Clone for QueueFamilyCriteria
impl Clone for QueueFamilyCriteria
Source§fn clone(&self) -> QueueFamilyCriteria
fn clone(&self) -> QueueFamilyCriteria
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more