Class AMDBufferMarker

java.lang.Object
org.lwjgl.vulkan.AMDBufferMarker

public class AMDBufferMarker extends Object
This extension adds a new operation to execute pipelined writes of small marker values into a VkBuffer object.

The primary purpose of these markers is to facilitate the development of debugging tools for tracking which pipelined command contributed to device loss.

Examples

None.

Name String
VK_AMD_buffer_marker
Extension Type
Device extension
Registered Extension Number
180
Revision
1
API Interactions
  • Interacts with VK_VERSION_1_3
  • Interacts with VK_KHR_synchronization2
Special Use
Contact
Other Extension Metadata
Last Modified Date
2018-01-26
IP Status
No known IP claims.
Contributors
  • Matthaeus G. Chajdas, AMD
  • Jaakko Konttinen, AMD
  • Daniel Rakos, AMD
  • Field Details

    • VK_AMD_BUFFER_MARKER_SPEC_VERSION

      public static final int VK_AMD_BUFFER_MARKER_SPEC_VERSION
      The extension specification version.
      See Also:
    • VK_AMD_BUFFER_MARKER_EXTENSION_NAME

      public static final String VK_AMD_BUFFER_MARKER_EXTENSION_NAME
      The extension name.
      See Also:
  • Method Details

    • vkCmdWriteBufferMarkerAMD

      public static void vkCmdWriteBufferMarkerAMD(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int pipelineStage, long dstBuffer, long dstOffset, int marker)
      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:

      
       void vkCmdWriteBufferMarkerAMD(
           VkCommandBuffer                             commandBuffer,
           VkPipelineStageFlagBits                     pipelineStage,
           VkBuffer                                    dstBuffer,
           VkDeviceSize                                dstOffset,
           uint32_t                                    marker);
      Description

      The command will write the 32-bit marker value into the buffer only after all preceding commands have finished executing up to at least the specified pipeline stage. This includes the completion of other preceding vkCmdWriteBufferMarkerAMD commands so long as their specified pipeline stages occur either at the same time or earlier than this command’s specified pipelineStage.

      While consecutive buffer marker writes with the same pipelineStage parameter are implicitly complete in submission order, memory and execution dependencies between buffer marker writes and other operations must still be explicitly ordered using synchronization commands. The access scope for buffer marker writes falls under the ACCESS_TRANSFER_WRITE_BIT, and the pipeline stages for identifying the synchronization scope must include both pipelineStage and PIPELINE_STAGE_TRANSFER_BIT.

      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
      Valid Usage (Implicit)
      • commandBuffer must be a valid VkCommandBuffer handle
      • If pipelineStage is not 0, pipelineStage must be a valid VkPipelineStageFlagBits value
      • dstBuffer must be a valid VkBuffer handle
      • commandBuffer must be in the recording state
      • The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations
      • This command must only be called outside of a video coding scope
      • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
      Primary SecondaryBothOutsideTransfer Graphics ComputeAction
      Parameters:
      commandBuffer - the command buffer into which the command will be recorded.
      pipelineStage - a VkPipelineStageFlagBits value specifying the pipeline stage whose completion triggers the marker write.
      dstBuffer - the buffer where the marker will be written to.
      dstOffset - the byte offset into the buffer where the marker will be written to.
      marker - the 32-bit value of the marker.
    • vkCmdWriteBufferMarker2AMD

      public static void vkCmdWriteBufferMarker2AMD(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long stage, long dstBuffer, long dstOffset, int marker)
      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:

      
       void vkCmdWriteBufferMarker2AMD(
           VkCommandBuffer                             commandBuffer,
           VkPipelineStageFlags2                       stage,
           VkBuffer                                    dstBuffer,
           VkDeviceSize                                dstOffset,
           uint32_t                                    marker);
      Description

      The command will write the 32-bit marker value into the buffer only after all preceding commands have finished executing up to at least the specified pipeline stage. This includes the completion of other preceding vkCmdWriteBufferMarker2AMD commands so long as their specified pipeline stages occur either at the same time or earlier than this command’s specified stage.

      While consecutive buffer marker writes with the same stage parameter implicitly complete in submission order, memory and execution dependencies between buffer marker writes and other operations must still be explicitly ordered using synchronization commands. The access scope for buffer marker writes falls under the ACCESS_TRANSFER_WRITE_BIT, and the pipeline stages for identifying the synchronization scope must include both stage and PIPELINE_STAGE_TRANSFER_BIT.

      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
      Valid Usage (Implicit)
      • commandBuffer must be a valid VkCommandBuffer handle
      • stage must be a valid combination of VkPipelineStageFlagBits2 values
      • dstBuffer must be a valid VkBuffer handle
      • commandBuffer must be in the recording state
      • The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations
      • This command must only be called outside of a video coding scope
      • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
      Primary SecondaryBothOutsideTransfer Graphics ComputeAction
      Parameters:
      commandBuffer - the command buffer into which the command will be recorded.
      stage - specifies the pipeline stage whose completion triggers the marker write.
      dstBuffer - the buffer where the marker will be written.
      dstOffset - the byte offset into the buffer where the marker will be written.
      marker - the 32-bit value of the marker.