LiteFX::Rendering::CommandBuffer
Represents a command buffer, that buffers commands that should be submitted to a CommandQueue.
Synopsis
Declared in <litefx/rendering.hpp>
template<
typename TCommandBuffer,
typename TBuffer,
typename TVertexBuffer,
typename TIndexBuffer,
typename TImage,
typename TBarrier,
typename TPipeline,
typename TBLAS,
typename TTLAS>
requires meta::implements<TBarrier, Barrier<TBuffer, TImage>> &&
//std::derived_from<TCommandBuffer, ICommandBuffer> &&
std::derived_from<TPipeline, Pipeline<typename TPipeline::pipeline_layout_type, typename TPipeline::shader_program_type>> &&
std::derived_from<TBLAS, IBottomLevelAccelerationStructure> &&
std::derived_from<TTLAS, ITopLevelAccelerationStructure>
class CommandBuffer
: public ICommandBuffer
Base Classes
Type Aliases
Member Functions
| Name | Description |
~CommandBuffer [destructor] [virtual] | Destructor |
barrier | Executes the transitions that have been added to barrier. |
begin [virtual] | Sets the command buffer into recording state, so that it can receive command that should be submitted to the parent CommandQueue. |
bind | bind overloads |
buildAccelerationStructure | buildAccelerationStructure overloads |
copyAccelerationStructure | Copies the acceleration structure from into the acceleration structure to. |
dispatch | Executes a compute shader. |
dispatchIndirect | Executes a set of indirect dispatches. |
dispatchMesh | Executes a mesh shader pipeline. |
dispatchMeshIndirect | Executes a set of indirect mesh shader dispatches. |
draw | draw overloads |
drawIndexed | drawIndexed overloads |
drawIndexedIndirect | Executes a set of indirect indexed draw calls. |
drawIndirect | Executes a set of indirect non-indexed draw calls. |
end [virtual] | Ends recording commands on the command buffer. |
execute | execute overloads |
isSecondary [virtual] | Returns true, if the command buffer is a secondary command buffer, or false otherwise. |
makeBarrier [virtual] | Creates a new barrier instance. |
pushConstants | Pushes a block of memory into the push constants backing memory. |
queue | Gets a pointer to the command queue that this command buffer was allocated from or nullptr, if the queue has already been released. |
setBlendFactors [virtual] | Sets the blend factors for the subsequent draw calls. |
setDepthBounds [virtual] | Sets the depth range for the depth bounds test. |
setScissors | setScissors overloads |
setStencilRef [virtual] | Sets the stencil reference for the subsequent draw calls. |
setViewports | setViewports overloads |
shared_from_this | Returns a shared pointer to the current object instance. |
submit [virtual] | Submits the command buffer to parent command |
traceRays | Executes a query on a ray-tracing pipeline. |
track | track overloads |
transfer | transfer overloads |
updateAccelerationStructure | updateAccelerationStructure overloads |
use | Sets the active pipeline state. |
weak_from_this | Returns a weak pointer to the current object instance. |
writeTimingEvent [virtual] | Writes the current GPU time stamp value for the timing event. |
Using Declarations
Protected Types
| Name | Description |
Allocator | An allocator used to allocate the shared object. |
Protected Member Functions
| Name | Description |
operator= | Assignment operators |
releaseSharedState [virtual] | Called by the parent command queue to signal that the command buffer should release it's shared state. |
Protected Static Member Functions
| Name | Description |
create | Generic factory method used to create instances of the shared object. |
Friends
| Name | Description |
TCommandBuffer | |
Template Parameters
| Name | Description |
| TCommandBuffer | The type of the command buffer itself. Must inherit from CommandBuffer. |
| TBuffer | The generic buffer type. Must implement IBuffer. |
| TVertexBuffer | The vertex buffer type. Must implement VertexBuffer. |
| TIndexBuffer | The index buffer type. Must implement IndexBuffer. |
| TImage | The generic image type. Must implement IImage. |
| TBarrier | The barrier type. Must implement Barrier. |
| TPipeline | The common pipeline interface type. Must be derived from Pipeline. |
| TBLAS | The type of the bottom-level acceleration structure. Must implement IBottomLevelAccelerationStructure. |
| TTLAS | The type of the top-level acceleration structure. Must implement ITopLevelAccelerationStructure. |
Derived Classes