mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2025-02-17 01:23:00 +00:00
fix queue 'supports_' methods with empty flags (#1822)
This commit is contained in:
parent
24c0e749a5
commit
d701a3a90b
@ -923,13 +923,17 @@ impl<'a> QueueFamily<'a> {
|
||||
/// Returns `true` if queues of this family can execute graphics operations.
|
||||
#[inline]
|
||||
pub fn supports_graphics(&self) -> bool {
|
||||
!(self.properties.queue_flags & ash::vk::QueueFlags::GRAPHICS).is_empty()
|
||||
self.properties
|
||||
.queue_flags
|
||||
.contains(ash::vk::QueueFlags::GRAPHICS)
|
||||
}
|
||||
|
||||
/// Returns `true` if queues of this family can execute compute operations.
|
||||
#[inline]
|
||||
pub fn supports_compute(&self) -> bool {
|
||||
!(self.properties.queue_flags & ash::vk::QueueFlags::COMPUTE).is_empty()
|
||||
self.properties
|
||||
.queue_flags
|
||||
.contains(ash::vk::QueueFlags::COMPUTE)
|
||||
}
|
||||
|
||||
/// Returns `true` if queues of this family can execute transfer operations.
|
||||
@ -939,19 +943,25 @@ impl<'a> QueueFamily<'a> {
|
||||
/// > to indicate a special relationship with the DMA module and more efficient transfers.
|
||||
#[inline]
|
||||
pub fn explicitly_supports_transfers(&self) -> bool {
|
||||
!(self.properties.queue_flags & ash::vk::QueueFlags::TRANSFER).is_empty()
|
||||
self.properties
|
||||
.queue_flags
|
||||
.contains(ash::vk::QueueFlags::TRANSFER)
|
||||
}
|
||||
|
||||
/// Returns `true` if queues of this family can execute sparse resources binding operations.
|
||||
#[inline]
|
||||
pub fn supports_sparse_binding(&self) -> bool {
|
||||
!(self.properties.queue_flags & ash::vk::QueueFlags::SPARSE_BINDING).is_empty()
|
||||
self.properties
|
||||
.queue_flags
|
||||
.contains(ash::vk::QueueFlags::SPARSE_BINDING)
|
||||
}
|
||||
|
||||
/// Returns `true` if the queues of this family support a particular pipeline stage.
|
||||
#[inline]
|
||||
pub fn supports_stage(&self, stage: PipelineStage) -> bool {
|
||||
!(self.properties.queue_flags & stage.required_queue_flags()).is_empty()
|
||||
self.properties
|
||||
.queue_flags
|
||||
.contains(stage.required_queue_flags())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user