vkCmdWriteBufferMarkerAMD(3)

# vkCmdWriteBufferMarkerAMD(3) Manual Page

## Name

vkCmdWriteBufferMarkerAMD - Execute a pipelined write of a marker value into a buffer

## C Specification

To write a 32-bit marker value into a buffer as a pipelined operation, call:

    // Provided by VK_AMD_buffer_marker
    void vkCmdWriteBufferMarkerAMD(
        VkCommandBuffer                             commandBuffer,
        VkPipelineStageFlagBits                     pipelineStage,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        uint32_t                                    marker);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pipelineStage` is a VkPipelineStageFlagBits value specifying the pipeline stage whose completion triggers the marker write.

- `dstBuffer` is the buffer where the marker will be written to.

- `dstOffset` is the byte offset into the buffer where the marker will be written to.

- `marker` is the 32-bit value of the marker.

## Description

When `vkCmdWriteBufferMarkerAMD` 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.

Note | Similar to `vkCmdWriteTimestamp`, if an implementation is unable to write a marker at any specific pipeline stage, it may instead do so at any logically later stage.

Note | Implementations may only support a limited number of pipelined marker write operations in flight at a given time, thus excessive number of marker write operations may degrade command execution performance.

Valid Usage

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04074
  `pipelineStage` must be a valid stage for the queue family that was used to create the command pool that `commandBuffer` was allocated from

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04075
  If the `geometryShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04076
  If the `tessellationShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04077
  If the `conditionalRendering` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04078
  If the `fragmentDensityMap` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04079
  If the `transformFeedback` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-04080
  If the `meshShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-07077
  If the `taskShader` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdWriteBufferMarkerAMD-shadingRateImage-07314
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdWriteBufferMarkerAMD-synchronization2-06489
  If the `synchronization2` feature is not enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_NONE

- VUID-vkCmdWriteBufferMarkerAMD-rayTracingPipeline-07943
  If neither of the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `pipelineStage` must not be VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01798
  `dstOffset` must be less than or equal to the size of `dstBuffer` minus `4`

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01799
  `dstBuffer` must have been created with the VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01800
  If `dstBuffer` is non-sparse then it must be bound completely and contiguously to a single `VkDeviceMemory` object

- VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01801
  `dstOffset` must be a multiple of `4`

Valid Usage (Implicit)

- VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-parameter
  If `pipelineStage` is not `0`, `pipelineStage` must be a valid VkPipelineStageFlagBits value

- VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-parameter
  `dstBuffer` must be a valid VkBuffer handle

- VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdWriteBufferMarkerAMD-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-vkCmdWriteBufferMarkerAMD-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdWriteBufferMarkerAMD-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdWriteBufferMarkerAMD-commonparent
  Both of `commandBuffer`, and `dstBuffer` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action

Conditional Rendering

vkCmdWriteBufferMarkerAMD is not affected by conditional rendering

## See Also

VK_AMD_buffer_marker, VkBuffer, VkCommandBuffer, VkDeviceSize, VkPipelineStageFlagBits

## Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0