Skip to content

LiteFX::Rendering::QueueType

Represents the type of a CommandQueue.

Synopsis

Declared in <litefx/rendering_api.hpp>

enum class QueueType : UInt32;

Description

There are three major queue types: Graphics, Compute and Transfer. Each queue type has a larger subset of commands it is allowed to execute. For example, a graphics queue can be used to execute transfer or compute commands, whilst a compute queue may not execute graphics commands (such as draw).

You should always aim to use a queue that is dedicated for the workload you want to submit. For example, if you want to upload resources to the GPU, use the a dedicated transfer queue and synchronize access to the resource by waiting for the queue to finish at the point of time you need to access the resource. You can, however, also use the graphics queue for transfers. This can be more efficient, if you have resources that require to be updated with each frame. The performance impact of synchronizing two queues may be larger than simply using the graphics queue to begin with.

The advantage of using dedicated queues is, that they do not necessarily block execution. For example, when performing a compute or transfer workload on a graphics queue, you do not need to synchronize in order to wait for the result, however this also means that no rendering can take place until the workloads have finished.

Members

NameDescription
None Describes an unspecified command queue. It is not valid to create a queue instance with this type.
Graphics Represents a queue that can execute graphics, compute and transfer workloads.
Compute Represents a queue that can execute compute and transfer workloads.
Transfer Represents a queue that can execute only transfer workloads.
VideoDecode Represents a queue that can perform hardware video decoding.
VideoEncode Represents a queue that can perform hardware video encoding.
Other Represents an invalid queue type.

Non-Member Functions

NameDescription
operator&Bitwise conjunction operator
operator&=Bitwise conjunction assignment operator
operator|Bitwise disjunction operator
operator|=Bitwise disjunction assignment operator