[][src]Struct gfx_hal::queue::CommandQueue

pub struct CommandQueue<B: Backend, C>(_, _);

Stronger-typed and safer CommandQueue wraps around RawCommandQueue.

Methods

impl<B: Backend, C: Capability> CommandQueue<B, C>[src]

pub unsafe fn new(raw: B::CommandQueue) -> Self[src]

Create typed command queue from raw.

Safety

<C as Capability>::supported_by(queue_type) must return true for queue_type being the type this raw queue.

pub fn as_raw(&self) -> &B::CommandQueue[src]

Get a reference to the raw command queue

pub unsafe fn as_raw_mut(&mut self) -> &mut B::CommandQueue[src]

Get a mutable reference to the raw command queue

pub fn into_raw(self) -> B::CommandQueue[src]

Downgrade a typed command queue to untyped one.

pub unsafe fn submit<'a, T, Ic, S, Iw, Is>(
    &mut self,
    submission: Submission<Ic, Iw, Is>,
    fence: Option<&B::Fence>
) where
    T: 'a + Submittable<B, C, Primary>,
    Ic: IntoIterator<Item = &'a T>,
    S: 'a + Borrow<B::Semaphore>,
    Iw: IntoIterator<Item = (&'a S, PipelineStage)>,
    Is: IntoIterator<Item = &'a S>, 
[src]

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.

pub unsafe fn submit_nosemaphores<'a, T, I>(
    &mut self,
    command_buffers: I,
    fence: Option<&B::Fence>
) where
    T: 'a + Submittable<B, C, Primary>,
    I: IntoIterator<Item = &'a T>, 
[src]

Submit command buffers without any semaphore waits or signals.

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

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.

pub fn wait_idle(&self) -> Result<(), HostExecutionError>[src]

Wait for the queue to idle.

pub unsafe fn downgrade<D>(&mut self) -> &mut CommandQueue<B, D> where
    C: Supports<D>, 
[src]

Downgrade a command queue to a lesser capability type.

Trait Implementations

impl<B: Debug + Backend, C: Debug> Debug for CommandQueue<B, C> where
    B::CommandQueue: Debug
[src]

Auto Trait Implementations

impl<B, C> Unpin for CommandQueue<B, C> where
    C: Unpin,
    <B as Backend>::CommandQueue: Unpin

impl<B, C> Sync for CommandQueue<B, C> where
    C: Sync,
    <B as Backend>::CommandQueue: Sync

impl<B, C> Send for CommandQueue<B, C> where
    C: Send,
    <B as Backend>::CommandQueue: Send

impl<B, C> UnwindSafe for CommandQueue<B, C> where
    C: UnwindSafe,
    <B as Backend>::CommandQueue: UnwindSafe

impl<B, C> RefUnwindSafe for CommandQueue<B, C> where
    C: RefUnwindSafe,
    <B as Backend>::CommandQueue: RefUnwindSafe

Blanket Implementations

impl<T> Supports<T> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]