class
CommandListAn abstract class that implements common functionality for recording commands inside either a compute or render pass. See tp::
Derived classes
- class ComputeList
- Provides an interface to directly record compute commands into a Vulkan VkCommandBuffer inside a compute pass.
- class RenderList
- Provides an interface to directly record graphics commands into a Vulkan VkCommandBuffer inside a compute pass.
Public functions
- void cmdBeginDebugLabel(const char* name, ArrayParameter<const float> color = {})
- Begins a debug label, marking the following commands until the next tp::
CommandList:: cmdEndDebugLabel with the given name and optional color for display in validation and debugging tools. - void cmdBindDescriptorSets(const PipelineLayout& pipelineLayout, ArrayParameter<const DescriptorSetView> descriptorSets, uint32_t firstSet = 0, ArrayParameter<const uint32_t> dynamicOffsets = {})
- Binds descriptor sets for use in the subsequent commands.
- void cmdEndDebugLabel()
- Ends the last debug label. Must be preceded by tp::
CommandList:: cmdBeginDebugLabel. - void cmdInsertDebugLabel(const char* name, ArrayParameter<const float> color = {})
- Inserts a debug label, marking the following commands with the given name and optional color for display in validation and debugging tools.
-
template<typename T>void cmdPushConstants(const PipelineLayout& pipelineLayout, ShaderStageMask stageMask, const T& value, uint32_t offsetBytes = 0)
- Updates the push constant values using the given pipeline layout.
- void cmdPushConstants(const PipelineLayout& pipelineLayout, ShaderStageMask stageMask, const void* data, uint32_t sizeBytes, uint32_t offsetBytes = 0)
- Updates the push constant values using the given pipeline layout.
- auto isNull() const -> bool
- Returns
true
if the command list is null and not valid for use. - auto vkGetCommandBufferHandle() const -> VkCommandBufferHandle
- Returns the associated VkCommandBuffer handle if the command list is being recorded, VK_NULL_HANDLE otherwise.
Function documentation
void tp:: CommandList:: cmdBeginDebugLabel(const char* name,
ArrayParameter<const float> color = {})
Begins a debug label, marking the following commands until the next tp::
Parameters | |
---|---|
name | The name of the label. |
color | The color of the label. Only used by external tools. |
void tp:: CommandList:: cmdBindDescriptorSets(const PipelineLayout& pipelineLayout,
ArrayParameter<const DescriptorSetView> descriptorSets,
uint32_t firstSet = 0,
ArrayParameter<const uint32_t> dynamicOffsets = {})
Binds descriptor sets for use in the subsequent commands.
Parameters | |
---|---|
pipelineLayout | The tp:: |
descriptorSets | An array of pointers to tp:: |
firstSet | The set number in the pipeline layout that the first provided descriptor set will be bound to. |
dynamicOffsets | The dynamic offsets to be applied to the provided descriptors of types tp:: |
The provided descriptor sets are bound consecutively, meaning the first descriptor set gets bound to set number firstSet
, the second one to firstSet + 1
and so on.
void tp:: CommandList:: cmdEndDebugLabel()
Ends the last debug label. Must be preceded by tp::
void tp:: CommandList:: cmdInsertDebugLabel(const char* name,
ArrayParameter<const float> color = {})
Inserts a debug label, marking the following commands with the given name and optional color for display in validation and debugging tools.
Parameters | |
---|---|
name | The name of the label. |
color | The color of the label. Only used by external tools. |
template<typename T>
void tp:: CommandList:: cmdPushConstants(const PipelineLayout& pipelineLayout,
ShaderStageMask stageMask,
const T& value,
uint32_t offsetBytes = 0)
Updates the push constant values using the given pipeline layout.
Parameters | |
---|---|
pipelineLayout | The tp:: |
stageMask | The stages that will use the push constants in the updated range. |
value | The value that the push constants will be updated to. The size of the type determines the size of the updated range. |
offsetBytes | The offset to the start of the updated range in bytes. |
void tp:: CommandList:: cmdPushConstants(const PipelineLayout& pipelineLayout,
ShaderStageMask stageMask,
const void* data,
uint32_t sizeBytes,
uint32_t offsetBytes = 0)
Updates the push constant values using the given pipeline layout.
Parameters | |
---|---|
pipelineLayout | The tp:: |
stageMask | The stages that will use the push constants in the updated range. |
data | Pointer to the data that the push constants will be updated to. |
sizeBytes | The size of the updated range in bytes. |
offsetBytes | The offset to the start of the updated range in bytes. |