|
virtual std::shared_ptr< command_buffer_type > | createCommandBuffer (bool begin_recording=false, bool secondary=false) const noexcept=0 |
| Creates a command buffer that can be used to allocate commands on the queue.
|
|
virtual std::size_t | submit (std::shared_ptr< command_buffer_type > command_buffer) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
virtual std::size_t | submit (std::shared_ptr< const command_buffer_type > command_buffer) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
virtual std::size_t | submit (const std::vector< std::shared_ptr< const command_buffer_type > > &command_buffers) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
virtual std::size_t | submit (const std::vector< std::shared_ptr< command_buffer_type > > &command_buffers) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
Public Member Functions inherited from spark::render::ICommandQueue |
virtual bool | isBound () const noexcept=0 |
| Checks whether the queue is currently bound to the parent device.
|
|
virtual QueuePriority | priority () const noexcept=0 |
| Gets the priority of the queue.
|
|
virtual QueueType | type () const noexcept=0 |
| Gets the type of the queue.
|
|
virtual void | bind () const noexcept=0 |
| Binds the queue to the parent device.
|
|
virtual void | release () const noexcept=0 |
| Releases the queue from the parent device.
|
|
std::shared_ptr< ICommandBuffer > | createCommandBuffer (bool begin_recording=false, bool secondary=false) const noexcept |
| Creates a command buffer that can be used to allocate commands on the queue.
|
|
std::size_t | submit (std::shared_ptr< ICommandBuffer > command_buffer) const noexcept |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
std::size_t | submit (std::shared_ptr< const ICommandBuffer > command_buffer) const noexcept |
| Submits a single command buffer to the queue and inserts a fence to wait for it.
|
|
std::size_t | submit (const std::vector< std::shared_ptr< const ICommandBuffer > > &command_buffers) const noexcept |
| Submits multiple command buffers to the queue and inserts a fence to wait for them.
|
|
std::size_t | submit (const std::vector< std::shared_ptr< ICommandBuffer > > &command_buffers) const noexcept |
| Submits multiple command buffers to the queue and inserts a fence to wait for them.
|
|
virtual void | waitFor (std::size_t fence) const noexcept=0 |
| Waits for fence value fence to complete on the command queue.
|
|
virtual std::size_t | currentFence () const noexcept=0 |
| Gets the latest fence inserted into the queue.
|
|
template<typename CommandBufferType>
class spark::render::CommandQueue< CommandBufferType >
Represents a ICommandQueue.
- Template Parameters
-
CommandBufferType | Type of the command buffer that is used by the queue. (inherits from ICommandBuffer) |
template<typename CommandBufferType >
virtual std::shared_ptr< command_buffer_type > spark::render::CommandQueue< CommandBufferType >::createCommandBuffer |
( |
bool | begin_recording = false, |
|
|
bool | secondary = false ) const |
|
nodiscardpure virtualnoexcept |
Creates a command buffer that can be used to allocate commands on the queue.
- Parameters
-
begin_recording | true if the command buffer should be in recording state after creation, false otherwise. |
secondary | true if the command buffer should be a secondary command buffer, false otherwise. |
- Returns
- A std::shared_ptr to the created ICommandBuffer.
Specifying secondary
allows to create secondary command buffers (aka. bundles). Those are intended to be used as efficient pre-recorded command buffers that are re-used multiple times. Using such a command buffer allows drivers to pre-apply optimizations, which causes a one-time cost during setup, but reduces cost when re- applying the command buffer multiple times. Ideally they are used as small chunks of re-occurring workloads.
A secondary command buffer must not be submitted to a queue, but rather to a primary command buffer by calling ICommandBuffer::execute().
Implemented in spark::render::vk::VulkanQueue.