Trait gfx_hal::queue::CommandQueue[][src]

pub trait CommandQueue<B: Backend>: Debug + Any + Send + Sync {
    unsafe fn submit<'a, Ic, Iw, Is>(
        &mut self,
        command_buffers: Ic,
        wait_semaphores: Iw,
        signal_semaphores: Is,
        fence: Option<&mut B::Fence>
    )
    where
        Ic: Iterator<Item = &'a B::CommandBuffer>,
        Iw: Iterator<Item = (&'a B::Semaphore, PipelineStage)>,
        Is: Iterator<Item = &'a B::Semaphore>
;
unsafe fn present(
        &mut self,
        surface: &mut B::Surface,
        image: <B::Surface as PresentationSurface<B>>::SwapchainImage,
        wait_semaphore: Option<&mut B::Semaphore>
    ) -> Result<Option<Suboptimal>, PresentError>;
fn wait_idle(&mut self) -> Result<(), OutOfMemory>; }

Abstraction for an internal GPU execution engine.

Commands are executed on the the device by submitting command buffers.

Queues can also be used for presenting to a surface (that is, flip the front buffer with the next one in the chain).

Required methods

unsafe fn submit<'a, Ic, Iw, Is>(
    &mut self,
    command_buffers: Ic,
    wait_semaphores: Iw,
    signal_semaphores: Is,
    fence: Option<&mut B::Fence>
) where
    Ic: Iterator<Item = &'a B::CommandBuffer>,
    Iw: Iterator<Item = (&'a B::Semaphore, PipelineStage)>,
    Is: Iterator<Item = &'a B::Semaphore>, 
[src]

Submit command buffers to queue for execution.

Arguments

  • command_buffers - command buffers to submit.
  • wait_semaphores - semaphores to wait being signalled before submission.
  • signal_semaphores - semaphores to signal after all command buffers in the submission have finished execution.
  • fence - must be in unsignaled state, and will be signaled after all command buffers in the submission have finished execution.

Safety

It's not checked that the queue can process the submitted command buffers.

For example, trying to submit compute commands to a graphics queue will result in undefined behavior.

unsafe fn present(
    &mut self,
    surface: &mut B::Surface,
    image: <B::Surface as PresentationSurface<B>>::SwapchainImage,
    wait_semaphore: Option<&mut B::Semaphore>
) -> Result<Option<Suboptimal>, PresentError>
[src]

Present a swapchain image directly to a surface, after waiting on wait_semaphore.

Safety

Unsafe for the same reasons as submit. No checks are performed to verify that this queue supports present operations.

fn wait_idle(&mut self) -> Result<(), OutOfMemory>[src]

Wait for the queue to be idle.

Loading content...

Implementors

Loading content...