LiteFX 0.4.1.2025
Computer Graphics Engine
|
Represents a command queue. More...
#include <rendering.hpp>
Inherits LiteFX::Rendering::ICommandQueue.
Public Types | |
using | command_buffer_type = TCommandBuffer |
Public Member Functions | |
~CommandQueue () noexcept override=default | |
virtual SharedPtr< command_buffer_type > | createCommandBuffer (bool beginRecording=false, bool secondary=false) const =0 |
virtual UInt64 | submit (const SharedPtr< command_buffer_type > &commandBuffer) const |
virtual UInt64 | submit (const SharedPtr< const command_buffer_type > &commandBuffer) const =0 |
virtual UInt64 | submit (Enumerable< SharedPtr< const command_buffer_type > > commandBuffers) const =0 |
UInt64 | submit (const SharedPtr< const ICommandBuffer > &commandBuffer) const |
Submits a single command buffer with shared ownership and inserts a fence to wait for it. | |
UInt64 | submit (const SharedPtr< ICommandBuffer > &commandBuffer) const |
Submits a single command buffer with shared ownership and inserts a fence to wait for it. | |
UInt64 | submit (Enumerable< SharedPtr< const ICommandBuffer > > commandBuffers) const |
Submits a set of command buffers with shared ownership and inserts a fence to wait for them. | |
![]() | |
~ICommandQueue () noexcept override=default | |
virtual QueuePriority | priority () const noexcept=0 |
Returns the priority of the queue. | |
virtual QueueType | type () const noexcept=0 |
Returns the type of the queue. | |
virtual void | beginDebugRegion (const String &label, const Vectors::ByteVector3 &color=DEFAULT_DEBUG_COLOR) const noexcept |
Starts a new debug region. | |
virtual void | endDebugRegion () const noexcept |
Ends the current debug region. | |
virtual void | setDebugMarker (const String &label, const Vectors::ByteVector3 &color=DEFAULT_DEBUG_COLOR) const noexcept |
Inserts a debug marker. | |
SharedPtr< ICommandBuffer > | createCommandBuffer (bool beginRecording=false, bool secondary=false) const |
Creates a command buffer that can be used to allocate commands on the queue. | |
UInt64 | submit (const SharedPtr< const ICommandBuffer > &commandBuffer) const |
Submits a single command buffer with shared ownership and inserts a fence to wait for it. | |
UInt64 | submit (const SharedPtr< ICommandBuffer > &commandBuffer) const |
Submits a single command buffer with shared ownership and inserts a fence to wait for it. | |
UInt64 | submit (Enumerable< SharedPtr< const ICommandBuffer > > commandBuffers) const |
Submits a set of command buffers with shared ownership and inserts a fence to wait for them. | |
virtual void | waitFor (UInt64 fence) const =0 |
Lets the CPU wait for a certain fence value to complete on the command queue. | |
void | waitFor (const ICommandQueue &queue, UInt64 fence) const |
Lets the command queue wait for a certain fence value to complete on another queue. | |
virtual UInt64 | currentFence () const noexcept=0 |
Returns the value of the latest fence inserted into the queue. | |
![]() | |
virtual | ~SharedObject () noexcept=default |
Destroys the shared object. | |
template<typename TSelf > | |
auto | shared_from_this (this TSelf &&self) noexcept |
Returns a shared pointer to the current object instance. | |
template<typename TSelf > | |
auto | weak_from_this (this TSelf &&self) noexcept -> WeakPtr< std::remove_reference_t< TSelf > > |
Returns a weak pointer to the current object instance. | |
Protected Member Functions | |
CommandQueue () noexcept=default | |
CommandQueue (CommandQueue &&) noexcept=default | |
CommandQueue (const CommandQueue &)=default | |
CommandQueue & | operator= (CommandQueue &&) noexcept=default |
CommandQueue & | operator= (const CommandQueue &)=default |
![]() | |
ICommandQueue () noexcept=default | |
ICommandQueue (const ICommandQueue &)=default | |
ICommandQueue (ICommandQueue &&) noexcept=default | |
ICommandQueue & | operator= (const ICommandQueue &)=default |
ICommandQueue & | operator= (ICommandQueue &&) noexcept=default |
void | releaseSharedState (const ICommandBuffer &commandBuffer) const |
![]() | |
SharedObject () noexcept=default | |
Initializes a new shared object. | |
SharedObject (SharedObject &&) noexcept=default | |
SharedObject (const SharedObject &)=default | |
SharedObject & | operator= (SharedObject &&) noexcept=default |
SharedObject & | operator= (const SharedObject &)=default |
Additional Inherited Members | |
![]() | |
Event< QueueSubmittingEventArgs > | submitting |
Invoked, when one or more command buffers are submitted to the queue. | |
Event< QueueSubmittedEventArgs > | submitted |
Invoked, after one or more command buffers have been submitted to the queue. | |
![]() | |
static constexpr Vectors::ByteVector3 | DEFAULT_DEBUG_COLOR = { 128_b, 128_b, 128_b } |
The default color value for a debug region or marker, if no other has been specified. | |
![]() | |
template<typename T , typename... TArgs> | |
static auto | create (TArgs &&... args) -> SharedPtr< T > |
Generic factory method used to create instances of the shared object. | |
Represents a command queue.
TCommandBuffer | The type of the command buffer for this queue. Must implement CommandBuffer. |
using LiteFX::Rendering::CommandQueue< TCommandBuffer >::command_buffer_type = TCommandBuffer |
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefault |
|
overridedefaultnoexcept |
|
pure virtual |
Implemented in LiteFX::Rendering::Backends::DirectX12Queue, and LiteFX::Rendering::Backends::VulkanQueue.
|
protecteddefaultnoexcept |
|
protecteddefault |
|
inlinevirtual |
|
pure virtual |
|
inline |
Submits a single command buffer with shared ownership and inserts a fence to wait for it.
By calling this method, the queue takes shared ownership over the commandBuffer until the fence is passed. The reference will be released during a waitFor, if the awaited fence is inserted after the associated one.
Note that submitting a command buffer that is currently recording will implicitly close the command buffer.
commandBuffer | The command buffer to submit to the command queue. |
|
inline |
Submits a single command buffer with shared ownership and inserts a fence to wait for it.
By calling this method, the queue takes shared ownership over the commandBuffer until the fence is passed. The reference will be released during a waitFor, if the awaited fence is inserted after the associated one.
Note that submitting a command buffer that is currently recording will implicitly close the command buffer.
commandBuffer | The command buffer to submit to the command queue. |
|
pure virtual |
|
inline |
Submits a set of command buffers with shared ownership and inserts a fence to wait for them.
By calling this method, the queue takes shared ownership over the commandBuffers until the fence is passed. The reference will be released during a waitFor, if the awaited fence is inserted after the associated one.
Note that submitting a command buffer that is currently recording will implicitly close the command buffer.
commandBuffers | The command buffers to submit to the command queue. |