# vkCmdWriteMarkerToMemoryAMD(3) Manual Page

## Name

vkCmdWriteMarkerToMemoryAMD - Execute a pipelined write of a marker value into a memory range

Loading… please wait.

## C Specification

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

    // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker
    void vkCmdWriteMarkerToMemoryAMD(
        VkCommandBuffer                             commandBuffer,
        const VkMemoryMarkerInfoAMD*                pInfo);

## Parameters

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

- `pInfo` specifies a pointer to an VkMemoryMarkerInfoAMD structure defining parameters of this command.

## Description

When `vkCmdWriteMarkerToMemoryAMD` 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 `pInfo->stage`. It additionally includes other buffer marker write commands that occur earlier in submission order that specified either the same `pInfo->stage` 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 `pInfo->stage` 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 `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.

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

Valid Usage

- VUID-vkCmdWriteMarkerToMemoryAMD-synchronization2-13042
  The `synchronization2` feature must be enabled

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13043
  `pInfo->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-vkCmdWriteMarkerToMemoryAMD-commandBuffer-13044
  If `commandBuffer` is an unprotected command buffer and `protectedNoFault` is not supported, `pInfo->dstFlags` must not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdWriteMarkerToMemoryAMD-commandBuffer-13045
  If `commandBuffer` is a protected command buffer and `protectedNoFault` is not supported, `pInfo->dstFlags` must include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13046
  If `pInfo->dstFlags` includes VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR, the buffer from which `pInfo->dstRange` was queried must have been created with VK_BUFFER_CREATE_PROTECTED_BIT

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-13047
  If `pInfo->dstFlags` does not include VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR, the buffer from which `pInfo->dstRange` was queried must have been created without VK_BUFFER_CREATE_PROTECTED_BIT

Valid Usage (Implicit)

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

- VUID-vkCmdWriteMarkerToMemoryAMD-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkMemoryMarkerInfoAMD structure

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

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

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

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

vkCmdWriteMarkerToMemoryAMD is not affected by conditional rendering

## See Also

VK_AMD_buffer_marker, VK_KHR_device_address_commands, VkCommandBuffer, VkMemoryMarkerInfoAMD

## 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