LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::CommandQueue< TCommandBuffer > Class Template Referenceabstract

Represents a command queue. More...

#include <rendering.hpp>

Inherits LiteFX::Rendering::ICommandQueue.

Public Types

using command_buffer_type = TCommandBuffer
 

Public Member Functions

virtual ~CommandQueue () noexcept=default
 
virtual UniquePtr< command_buffer_typecreateCommandBuffer (const bool &beginRecording=false) const =0
 
virtual UInt64 submit (const command_buffer_type &commandBuffer) const =0
 
virtual UInt64 submit (const Array< const command_buffer_type * > &commandBuffers) const =0
 
- Public Member Functions inherited from LiteFX::Rendering::ICommandQueue
virtual ~ICommandQueue () noexcept=default
 
virtual bool isBound () const noexcept=0
 Returns true, if the command queue is bound on the parent device. More...
 
virtual const QueuePriority & priority () const noexcept=0
 Returns the priority of the queue. More...
 
virtual const QueueType & type () const noexcept=0
 Returns the type of the queue. More...
 
virtual void bind ()=0
 Binds the queue on the parent device. More...
 
virtual void release ()=0
 Releases the queue from the parent device. More...
 
UniquePtr< ICommandBuffercreateCommandBuffer (const bool &beginRecording=false) const
 Creates a command buffer that can be used to allocate commands on the queue. More...
 
UInt64 submit (const ICommandBuffer &commandBuffer) const
 Submits a single command buffer and inserts a fence to wait for it. More...
 
UInt64 submit (const Array< const ICommandBuffer * > &commandBuffers) const
 Submits a set of command buffers and inserts a fence to wait for them. More...
 
virtual void waitFor (const UInt64 &fence) const noexcept=0
 Waits for a certain fence value to complete on the command queue. More...
 
virtual UInt64 currentFence () const noexcept=0
 Returns the value of the latest fence inserted into the queue. More...
 

Detailed Description

template<typename TCommandBuffer>
requires rtti::implements<TCommandBuffer, CommandBuffer<typename TCommandBuffer::buffer_type, typename TCommandBuffer::vertex_buffer_type, typename TCommandBuffer::index_buffer_type, typename TCommandBuffer::image_type, typename TCommandBuffer::barrier_type, typename TCommandBuffer::pipeline_type>>
class LiteFX::Rendering::CommandQueue< TCommandBuffer >

Represents a command queue.

Template Parameters
TCommandBufferThe type of the command buffer for this queue. Must implement CommandBuffer.

Member Typedef Documentation

◆ command_buffer_type

template<typename TCommandBuffer >
using LiteFX::Rendering::CommandQueue< TCommandBuffer >::command_buffer_type = TCommandBuffer

Constructor & Destructor Documentation

◆ ~CommandQueue()

template<typename TCommandBuffer >
virtual LiteFX::Rendering::CommandQueue< TCommandBuffer >::~CommandQueue ( )
virtualdefaultnoexcept

Member Function Documentation

◆ createCommandBuffer()

template<typename TCommandBuffer >
virtual UniquePtr< command_buffer_type > LiteFX::Rendering::CommandQueue< TCommandBuffer >::createCommandBuffer ( const bool &  beginRecording = false) const
pure virtual

◆ submit() [1/2]

template<typename TCommandBuffer >
virtual UInt64 LiteFX::Rendering::CommandQueue< TCommandBuffer >::submit ( const Array< const command_buffer_type * > &  commandBuffers) const
pure virtual

◆ submit() [2/2]

template<typename TCommandBuffer >
virtual UInt64 LiteFX::Rendering::CommandQueue< TCommandBuffer >::submit ( const command_buffer_type commandBuffer) const
pure virtual