vkCmdPreprocessGeneratedCommandsEXT
Commands can be preprocessed prior execution using the following command:
void vkCmdPreprocessGeneratedCommandsEXT(
VkCommandBuffer commandBuffer,
const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo,
VkCommandBuffer stateCommandBuffer);
commandBuffer
is the command buffer which does the preprocessing.pGeneratedCommandsInfo
is a pointer to a VkGeneratedCommandsInfoEXT structure containing parameters affecting the preprocessing step.stateCommandBuffer
is a command buffer from which to snapshot current states affecting the preprocessing step. When a graphics command action token is used, graphics state is snapshotted. When a compute action command token is used, compute state is snapshotted. When a ray tracing action command token is used, ray tracing state is snapshotted. It can be deleted at any time after this command has been recorded.
stateCommandBuffer
access is not synchronized by the driver, meaning
that this command buffer must not be modified between threads in an unsafe
manner.
Valid Usage
VUID-vkCmdPreprocessGeneratedCommandsEXT-pGeneratedCommandsInfo-11082
pGeneratedCommandsInfo
’s indirectCommandsLayout
must have
been created with the
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT
bit
set
VUID-vkCmdPreprocessGeneratedCommandsEXT-indirectCommandsLayout-11084
If the token sequence of the passed
VkGeneratedCommandsInfoEXT::indirectCommandsLayout
contains
a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT
token, the
initial shader state of
VkGeneratedCommandsInfoEXT::indirectExecutionSet
must be
bound on stateCommandBuffer
VUID-vkCmdPreprocessGeneratedCommandsEXT-stateCommandBuffer-11138
stateCommandBuffer
must be in the recording state
VUID-vkCmdPreprocessGeneratedCommandsEXT-deviceGeneratedCommands-11087
The VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT
::deviceGeneratedCommands
feature must be enabled
VUID-vkCmdPreprocessGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11088
Only stages specified in [VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::supportedIndirectCommandsShaderStages
](xref::limits-supportedIndirectCommandsShaderStages)
can be set in pGeneratedCommandsInfo→shaderStages
Valid Usage (Implicit)
VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdPreprocessGeneratedCommandsEXT-pGeneratedCommandsInfo-parameter
pGeneratedCommandsInfo
must be a valid pointer to a valid VkGeneratedCommandsInfoEXT structure
VUID-vkCmdPreprocessGeneratedCommandsEXT-stateCommandBuffer-parameter
stateCommandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdPreprocessGeneratedCommandsEXT-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support graphics, or compute operations
VUID-vkCmdPreprocessGeneratedCommandsEXT-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdPreprocessGeneratedCommandsEXT-videocoding
This command must only be called outside of a video coding scope
VUID-vkCmdPreprocessGeneratedCommandsEXT-bufferlevel
commandBuffer
must be a primary VkCommandBuffer
VUID-vkCmdPreprocessGeneratedCommandsEXT-commonparent
Both of commandBuffer
, and stateCommandBuffer
must have been created, allocated, or retrieved from the same VkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to
stateCommandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized ::