Trait vulkano::command_buffer::submit::CommandBuffer
[−]
[src]
pub unsafe trait CommandBuffer { type Pool: CommandPool; type SemaphoresWaitIterator: Iterator<Item=(Arc<Semaphore>, PipelineStages)>; type SemaphoresSignalIterator: Iterator<Item=Arc<Semaphore>>; fn inner(&self) -> &UnsafeCommandBuffer<Self::Pool>; unsafe fn on_submit<F>(&self, queue: &Arc<Queue>, fence: F) -> SubmitInfo<Self::SemaphoresWaitIterator, Self::SemaphoresSignalIterator> where F: FnMut() -> Arc<Fence>; fn submit(self, queue: &Arc<Queue>) -> Submission where Self: Sized + 'static { ... } }
Trait for objects that represent commands ready to be executed by the GPU.
Associated Types
type Pool: CommandPool
Type of the pool that was used to allocate the command buffer.
type SemaphoresWaitIterator: Iterator<Item=(Arc<Semaphore>, PipelineStages)>
Iterator that returns the list of semaphores to wait upon before the command buffer is submitted.
type SemaphoresSignalIterator: Iterator<Item=Arc<Semaphore>>
Iterator that returns the list of semaphores to signal after the command buffer has finished execution.
Required Methods
fn inner(&self) -> &UnsafeCommandBuffer<Self::Pool>
Returns the inner object.
unsafe fn on_submit<F>(&self, queue: &Arc<Queue>, fence: F) -> SubmitInfo<Self::SemaphoresWaitIterator, Self::SemaphoresSignalIterator> where F: FnMut() -> Arc<Fence>
Called slightly before the command buffer is submitted. Signals the command buffers that it is going to be submitted on the given queue. The function must return the list of semaphores to wait upon and transitions to perform.
The fence
parameter is a closure that can be used to pull a fence if required. If a fence
is pulled, it is guaranteed that it will be signaled after the command buffer ends.
Safety for the caller
This function must only be called if there's actually a submission that follows. If a fence is pulled, then it must eventually be signaled. All the semaphores that are waited upon must become unsignaled, and all the semaphores that are supposed to be signaled must become signaled.
This function is supposed to be called only by vulkano's internals. It is recommended that you never call it.
Safety for the implementation
The implementation must ensure that the command buffer doesn't get destroyed before the fence is signaled, or before a fence of a later submission to the same queue is signaled.
Provided Methods
fn submit(self, queue: &Arc<Queue>) -> Submission where Self: Sized + 'static
Submits the command buffer.
Note that since submitting has a fixed overhead, you should try, if possible, to submit multiple command buffers at once instead.
This is a simple shortcut for creating a Submit
object.
Implementors
impl<L, Pl, S> CommandBuffer for DispatchCommandCb<L, Pl, S> where L: CommandBuffer, Pl: PipelineLayout, S: TrackedDescriptorSetsCollection
impl<L, Pv, Pl, Prp, S> CommandBuffer for DrawCommandCb<L, Pv, Pl, Prp, S> where L: CommandBuffer, Pl: PipelineLayout, S: TrackedDescriptorSetsCollection
impl<P> CommandBuffer for PrimaryCb<P> where P: CommandPool
impl<Cb, L> CommandBuffer for ExecuteCommandCb<Cb, L> where Cb: CommandBuffer, L: CommandBuffer
impl<L, B> CommandBuffer for FillCommandCb<L, B> where B: TrackedBuffer, L: CommandBuffer
impl<L, Rp, Fb> CommandBuffer for BeginRenderPassCommandCb<L, Rp, Fb> where L: CommandBuffer, Rp: RenderPass, Fb: Framebuffer
impl<L> CommandBuffer for NextSubpassCommandCb<L> where L: CommandBuffer
impl<L> CommandBuffer for EndRenderPassCommandCb<L> where L: CommandBuffer
impl<L, B> CommandBuffer for UpdateCommandCb<L, B> where B: TrackedBuffer, L: CommandBuffer