vkCmdWriteBufferMarker2AMD
To write a 32-bit marker value into a buffer as a pipelined operation, call:
void vkCmdWriteBufferMarker2AMD(
VkCommandBuffer commandBuffer,
VkPipelineStageFlags2 stage,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
uint32_t marker);
pub fn cmd_write_buffer_marker2_amd(
command_buffer: vk::CommandBuffer,
stage: vk::PipelineStageFlags2,
dst_buffer: vk::Buffer,
dst_offset: vk::DeviceSize,
marker: u32,
);
commandBufferis the command buffer into which the command will be recorded.stagespecifies the pipeline stage whose completion triggers the marker write.dstBufferis the buffer where the marker will be written.dstOffsetis the byte offset into the buffer where the marker will be written.markeris the 32-bit value of the marker.
When vkCmdWriteBufferMarker2AMD is submitted to a queue, it defines an
execution dependency between prior operations and writing the marker value,
as well as a memory dependency from earlier buffer
marker write commands.
The first synchronization scope
includes operations performed by operations that occur earlier in
submission order in the pipeline stage
identified by pipelineStage.
It additionally includes other buffer marker write
commands that occur earlier in submission order that specified either the same pipelineStage or a
stage that is logically earlier.
The second synchronization scope includes only the buffer marker write.
The first access scope includes only accesses performed by other buffer marker write commands.
The second access scope is empty.
The access scope for buffer marker writes falls under the
VK_ACCESS_TRANSFER_WRITE_BIT flag, and is performed by either
pipelineStage or VK_PIPELINE_STAGE_TRANSFER_BIT.
Synchronization commands should specify this access
flag and both pipeline stages when defining dependencies with this command.
vkCmdWriteTimestamp2, if an implementation is unable to
write a marker at any specific pipeline stage, it may instead do so at any
logically later stage.Valid Usage
VUID-vkCmdWriteBufferMarker2AMD-stage-03929
If the geometryShader feature is not
enabled, stage must not contain
VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT
VUID-vkCmdWriteBufferMarker2AMD-stage-03930
If the tessellationShader feature
is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT or
VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT
VUID-vkCmdWriteBufferMarker2AMD-stage-03931
If the conditionalRendering
feature is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-stage-03932
If the fragmentDensityMap feature
is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-stage-03933
If the transformFeedback feature
is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-stage-03934
If the meshShader feature is not enabled,
stage must not contain
VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-stage-03935
If the taskShader feature is not enabled,
stage must not contain
VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-stage-07316
If neither of the shadingRateImage
or the attachmentFragmentShadingRate features are enabled,
stage must not contain
VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
VUID-vkCmdWriteBufferMarker2AMD-stage-04957
If the subpassShading feature is not
enabled, stage must not contain
VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI
VUID-vkCmdWriteBufferMarker2AMD-stage-04995
If the invocationMask feature is not
enabled, stage must not contain
VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI
VUID-vkCmdWriteBufferMarker2AMD-stage-07946
If neither the VK_NV_ray_tracing extension or the
rayTracingPipeline feature are
enabled, stage must not contain
VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR
VUID-vkCmdWriteBufferMarker2AMD-stage-10751
If the accelerationStructure
feature is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
VUID-vkCmdWriteBufferMarker2AMD-stage-10752
If the rayTracingMaintenance1
feature is not enabled, stage must not contain
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
VUID-vkCmdWriteBufferMarker2AMD-stage-10753
If the micromap feature is not enabled,
stage must not contain
VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
VUID-vkCmdWriteBufferMarker2AMD-synchronization2-03893
The synchronization2 feature must
be enabled
VUID-vkCmdWriteBufferMarker2AMD-stage-03894
stage must include only a single pipeline stage
VUID-vkCmdWriteBufferMarker2AMD-stage-03895
stage must include only stages that are valid for the queue
family that was used to create the command pool that commandBuffer
was allocated from
VUID-vkCmdWriteBufferMarker2AMD-dstOffset-03896
dstOffset must be less than or equal to the size of
dstBuffer minus 4
VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-03897
dstBuffer must have been created with the
VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set
VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-03898
If dstBuffer is non-sparse then it must be bound completely and
contiguously to a single VkDeviceMemory object
VUID-vkCmdWriteBufferMarker2AMD-dstOffset-03899
dstOffset must be a multiple of 4
Valid Usage (Implicit)
VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdWriteBufferMarker2AMD-stage-parameter
stage must be a valid combination of VkPipelineStageFlagBits2 values
VUID-vkCmdWriteBufferMarker2AMD-dstBuffer-parameter
dstBuffer must be a valid VkBuffer handle
VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations
VUID-vkCmdWriteBufferMarker2AMD-suspended
This command must not be called between suspended render pass instances
VUID-vkCmdWriteBufferMarker2AMD-videocoding
This command must only be called outside of a video coding scope
VUID-vkCmdWriteBufferMarker2AMD-commonparent
Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized