Skip to content

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

NameDescription
ICommandBufferThe interface for a command buffer.

Type Aliases

Member Functions

NameDescription
~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

NameDescription
Allocator An allocator used to allocate the shared object.

Protected Member Functions

NameDescription
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

NameDescription
create Generic factory method used to create instances of the shared object.

Friends

NameDescription
TCommandBuffer

Template Parameters

NameDescription
TCommandBufferThe type of the command buffer itself. Must inherit from CommandBuffer.
TBufferThe generic buffer type. Must implement IBuffer.
TVertexBufferThe vertex buffer type. Must implement VertexBuffer.
TIndexBufferThe index buffer type. Must implement IndexBuffer.
TImageThe generic image type. Must implement IImage.
TBarrierThe barrier type. Must implement Barrier.
TPipelineThe common pipeline interface type. Must be derived from Pipeline.
TBLASThe type of the bottom-level acceleration structure. Must implement IBottomLevelAccelerationStructure.
TTLASThe type of the top-level acceleration structure. Must implement ITopLevelAccelerationStructure.

Derived Classes

NameDescription
DirectX12CommandBuffer Records commands for a DirectX12Queue
VulkanCommandBuffer Records commands for a VulkanQueue