Struct gfx_hal::queue::CommandQueue
source · pub struct CommandQueue<B: Backend, C>(_, _);
Expand description
Stronger-typed and safer CommandQueue
wraps around RawCommandQueue
.
Implementations
sourceimpl<B: Backend, C: Capability> CommandQueue<B, C>
impl<B: Backend, C: Capability> CommandQueue<B, C>
sourcepub unsafe fn new(raw: B::CommandQueue) -> Self
pub unsafe fn new(raw: B::CommandQueue) -> Self
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.
sourcepub fn as_raw(&self) -> &B::CommandQueue
pub fn as_raw(&self) -> &B::CommandQueue
Get a reference to the raw command queue
sourcepub unsafe fn as_raw_mut(&mut self) -> &mut B::CommandQueue
pub unsafe fn as_raw_mut(&mut self) -> &mut B::CommandQueue
Get a mutable reference to the raw command queue
sourcepub fn into_raw(self) -> B::CommandQueue
pub fn into_raw(self) -> B::CommandQueue
Downgrade a typed command queue to untyped one.
sourcepub 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>,
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>,
Submits the submission command buffers to the queue for execution.
fence
will be signalled after submission and must be unsignalled.
sourcepub 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>,
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>,
Submit command buffers without any semaphore waits or singals.
sourcepub unsafe fn present<'a, W, Is, S, Iw>(
&mut self,
swapchains: Is,
wait_semaphores: Iw
) -> Result<(), ()>where
W: 'a + Borrow<B::Swapchain>,
Is: IntoIterator<Item = (&'a W, SwapImageIndex)>,
S: 'a + Borrow<B::Semaphore>,
Iw: IntoIterator<Item = &'a S>,
pub unsafe fn present<'a, W, Is, S, Iw>(
&mut self,
swapchains: Is,
wait_semaphores: Iw
) -> Result<(), ()>where
W: 'a + Borrow<B::Swapchain>,
Is: IntoIterator<Item = (&'a W, SwapImageIndex)>,
S: 'a + Borrow<B::Semaphore>,
Iw: IntoIterator<Item = &'a S>,
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.
sourcepub fn wait_idle(&self) -> Result<(), HostExecutionError>
pub fn wait_idle(&self) -> Result<(), HostExecutionError>
Wait for the queue to idle.
sourcepub unsafe fn downgrade<D>(&mut self) -> &mut CommandQueue<B, D>where
C: Supports<D>,
pub unsafe fn downgrade<D>(&mut self) -> &mut CommandQueue<B, D>where
C: Supports<D>,
Downgrade a command queue to a lesser capability type.