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 of the pool that was used to allocate the command buffer.

Iterator that returns the list of semaphores to wait upon before the command buffer is submitted.

Iterator that returns the list of semaphores to signal after the command buffer has finished execution.

Required Methods

Returns the inner object.

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

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