pub struct Queue { /* private fields */ }Expand description
An internally synchronized device queue.
Implementations§
Source§impl Queue
impl Queue
pub fn submit_one_fence_only( queue: &Queue, waits: [&Semaphore; 0], stages: [PipelineStageFlags; 0], buffers: [&CommandBuffer; 1], signals: [&Semaphore; 0], fence: Option<&Fence>, ) -> Result<(), QueueSubmitError>
Sourcepub fn submit_one(
queue: &Queue,
waits: [&Semaphore; 1],
stages: [PipelineStageFlags; 1],
buffers: [&CommandBuffer; 1],
signals: [&Semaphore; 1],
fence: Option<&Fence>,
) -> Result<(), QueueSubmitError>
pub fn submit_one( queue: &Queue, waits: [&Semaphore; 1], stages: [PipelineStageFlags; 1], buffers: [&CommandBuffer; 1], signals: [&Semaphore; 1], fence: Option<&Fence>, ) -> Result<(), QueueSubmitError>
Example submit function generated using the const_queue_submit! macro.
At some point in the distant future this function will become const generic and the macro will be an implementation detail.
Sourcepub fn present_one(
queue: &Queue,
waits: [&Semaphore; 1],
images: [&SwapchainImage; 1],
result_for_all: bool,
) -> QueuePresentMultipleResult<[QueuePresentResult; 1]>
pub fn present_one( queue: &Queue, waits: [&Semaphore; 1], images: [&SwapchainImage; 1], result_for_all: bool, ) -> QueuePresentMultipleResult<[QueuePresentResult; 1]>
Example present function generated using the const_queue_present! macro.
At some point in the distant future this function will become const generic and the macro will be an implementation detail.
Sourcepub unsafe fn from_device(
device: Vrc<Device>,
flags: DeviceQueueCreateFlags,
queue_family_index: u32,
queue_index: u32,
) -> Vrc<Self>
pub unsafe fn from_device( device: Vrc<Device>, flags: DeviceQueueCreateFlags, queue_family_index: u32, queue_index: u32, ) -> Vrc<Self>
Gets a queue from the logical device.
§Safety
Sourcepub unsafe fn submit(
&self,
infos: impl AsRef<[SubmitInfo]>,
fence: Option<&Fence>,
) -> Result<(), QueueSubmitError>
pub unsafe fn submit( &self, infos: impl AsRef<[SubmitInfo]>, fence: Option<&Fence>, ) -> Result<(), QueueSubmitError>
Submits to given queue.
§Safety
See https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueSubmit.html
§Panic
This function will panic if the Vutex is poisoned.
Sourcepub fn wait(&self) -> Result<(), QueueWaitError>
pub fn wait(&self) -> Result<(), QueueWaitError>
Waits until all outstanding operations on the queue are completed.
§Panic
This function will panic if the Vutex is poisoned.
pub const fn device(&self) -> &Vrc<Device>
pub const fn queue_family_index(&self) -> u32
pub const fn queue_index(&self) -> u32
Methods from Deref<Target = Vutex<Queue>>§
pub fn lock(&self) -> Result<VutexGuard<'_, T>, BorrowMutError>
Trait Implementations§
Source§impl HasSynchronizedHandle<Queue> for Queue
impl HasSynchronizedHandle<Queue> for Queue
fn lock_handle(&self) -> VutexGuard<'_, T>
fn lock_safe_handle(&self) -> VutexGuardSafeHandleBorrow<'_, T>
Source§impl Ord for Queue
impl Ord for Queue
Source§impl PartialOrd for Queue
impl PartialOrd for Queue
impl Eq for Queue
Auto Trait Implementations§
impl !Freeze for Queue
impl !RefUnwindSafe for Queue
impl !Send for Queue
impl !Sync for Queue
impl Unpin for Queue
impl UnwindSafe for Queue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more