[][src]Trait amethyst_rendy::rendy::hal::queue::RawCommandQueue

pub trait RawCommandQueue<B>: Send + Sync + Any + Debug where
    B: Backend
{ unsafe fn submit<'a, T, Ic, S, Iw, Is>(
        &mut self,
        submission: Submission<Ic, Iw, Is>,
        fence: Option<&<B as Backend>::Fence>
    )
    where
        Ic: IntoIterator<Item = &'a T>,
        Is: IntoIterator<Item = &'a S>,
        Iw: IntoIterator<Item = (&'a S, PipelineStage)>,
        S: 'a + Borrow<<B as Backend>::Semaphore>,
        T: 'a + Borrow<<B as Backend>::CommandBuffer>
;
unsafe fn present<'a, W, Is, S, Iw>(
        &mut self,
        swapchains: Is,
        wait_semaphores: Iw
    ) -> Result<Option<Suboptimal>, PresentError>
    where
        Is: IntoIterator<Item = (&'a W, u32)>,
        Iw: IntoIterator<Item = &'a S>,
        S: 'a + Borrow<<B as Backend>::Semaphore>,
        W: 'a + Borrow<<B as Backend>::Swapchain>
;
fn wait_idle(&self) -> Result<(), HostExecutionError>; }

RawCommandQueue are abstractions to the internal GPU execution engines. Commands are executed on the the device by submitting command buffers to queues.

Required methods

unsafe fn submit<'a, T, Ic, S, Iw, Is>(
    &mut self,
    submission: Submission<Ic, Iw, Is>,
    fence: Option<&<B as Backend>::Fence>
) where
    Ic: IntoIterator<Item = &'a T>,
    Is: IntoIterator<Item = &'a S>,
    Iw: IntoIterator<Item = (&'a S, PipelineStage)>,
    S: 'a + Borrow<<B as Backend>::Semaphore>,
    T: 'a + Borrow<<B as Backend>::CommandBuffer>, 

Submit command buffers to queue for execution. fence must be in unsignalled state, and will be signalled after all command buffers in the submission have finished execution.

Unsafe because it's not checked that the queue can process the submitted command buffers. Trying to submit compute commands to a graphics queue will result in undefined behavior. Each queue implements safer wrappers according to their supported functionalities!

unsafe fn present<'a, W, Is, S, Iw>(
    &mut self,
    swapchains: Is,
    wait_semaphores: Iw
) -> Result<Option<Suboptimal>, PresentError> where
    Is: IntoIterator<Item = (&'a W, u32)>,
    Iw: IntoIterator<Item = &'a S>,
    S: 'a + Borrow<<B as Backend>::Semaphore>,
    W: 'a + Borrow<<B as Backend>::Swapchain>, 

Presents the result of the queue to the given swapchains, after waiting on all the semaphores given in wait_semaphores. A given swapchain must not appear in this list more than once.

Unsafe for the same reasons as submit().

fn wait_idle(&self) -> Result<(), HostExecutionError>

Wait for the queue to idle.

Loading content...

Implementors

impl RawCommandQueue<Backend> for CommandQueue[src]

Loading content...