Class KHRSynchronization2
- java.lang.Object
-
- org.lwjgl.vulkan.KHRSynchronization2
-
public class KHRSynchronization2 extends java.lang.ObjectThis extension modifies the original core synchronization APIs to simplify the interface and improve usability of these APIs. It also adds new pipeline stage and access flag types that extend into the 64-bit range, as we have run out within the 32-bit range. The new flags are identical to the old values within the 32-bit range, with new stages and bits beyond that.Pipeline stages and access flags are now specified together in memory barrier structures, making the connection between the two more obvious. Additionally, scoping the pipeline stages into the barrier structs allows the use of the
MEMORY_READandMEMORY_WRITEflags without sacrificing precision. The per-stage access flags should be used to disambiguate specific accesses in a given stage or set of stages - for instance, between uniform reads and sampling operations.Layout transitions have been simplified as well; rather than requiring a different set of layouts for depth/stencil/color attachments, there are generic
IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHRandIMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRlayouts which are contextually applied based on the image format. For example, for a depth format image,IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRis equivalent toIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR.IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRalso functionally replacesIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.Events are now more efficient, because they include memory dependency information when you set them on the device. Previously, this information was only known when waiting on an event, so the dependencies could not be satisfied until the wait occurred. That sometimes meant stalling the pipeline when the wait occurred. The new API provides enough information for implementations to satisfy these dependencies in parallel with other tasks.
Queue submission has been changed to wrap command buffers and semaphores in extensible structures, which incorporate changes from Vulkan 1.1,
VK_KHR_device_group, andVK_KHR_timeline_semaphore. This also adds a pipeline stage to the semaphore signal operation, mirroring the existing pipeline stage specification for wait operations.Other miscellaneous changes include:
- Events can now be specified as interacting only with the device, allowing more efficient access to the underlying object.
- Image memory barriers that do not perform an image layout transition can be specified by setting
oldLayoutequal tonewLayout.- E.g. the old and new layout can both be set to
IMAGE_LAYOUT_UNDEFINED, without discarding data in the image.
- E.g. the old and new layout can both be set to
- Queue family ownership transfer parameters are simplified in some cases.
- Where two synchronization commands need to be matched up (queue transfer operations, events), the dependency information specified in each place must now match completely for consistency.
- Extensions with commands or functions with a
VkPipelineStageFlagsorVkPipelineStageFlagBitsparameter have had those APIs replaced with equivalents usingVkPipelineStageFlags2KHR. - The new event and barrier interfaces are now more extensible for future changes.
- Relevant pipeline stage masks can now be specified as empty with the new
PIPELINE_STAGE_NONE_KHRandPIPELINE_STAGE_2_NONE_KHRvalues. VkMemoryBarrier2KHRcan be chained toVkSubpassDependency2, overriding the original 32-bit stage and access masks.
Promotion to Vulkan 1.3
Functionality in this extension is included in core Vulkan 1.3, with the KHR suffix omitted. The original type, enum and command names are still available as aliases of the core functionality.
Examples
See https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples
VK_KHR_synchronization2
- Name String
VK_KHR_synchronization2- Extension Type
- Device extension
- Registered Extension Number
- 315
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Deprecation state
- Promoted to Vulkan 1.3
- Contact
- Tobias Hector tobski
Other Extension Metadata
- Last Modified Date
- 2020-12-03
- Interactions and External Dependencies
- Promoted to Vulkan 1.3 Core
- Interacts with
VK_KHR_create_renderpass2
- Contributors
- Tobias Hector
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdPipelineBarrier2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pDependencyInfo)Unsafe version of:CmdPipelineBarrier2KHRstatic voidnvkCmdSetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, long pDependencyInfo)Unsafe version of:CmdSetEvent2KHRstatic voidnvkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int eventCount, long pEvents, long pDependencyInfos)Unsafe version of:CmdWaitEvents2KHRstatic voidnvkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, long pCheckpointDataCount, long pCheckpointData)Unsafe version of:GetQueueCheckpointData2NVstatic intnvkQueueSubmit2KHR(org.lwjgl.vulkan.VkQueue queue, int submitCount, long pSubmits, long fence)Unsafe version of:QueueSubmit2KHRstatic voidvkCmdPipelineBarrier2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkDependencyInfo pDependencyInfo)SeeCmdPipelineBarrier2.static voidvkCmdResetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, long stageMask)SeeCmdResetEvent2.static voidvkCmdSetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, VkDependencyInfo pDependencyInfo)SeeCmdSetEvent2.static voidvkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long[] pEvents, VkDependencyInfo.Buffer pDependencyInfos)Array version of:CmdWaitEvents2KHRstatic voidvkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, java.nio.LongBuffer pEvents, VkDependencyInfo.Buffer pDependencyInfos)SeeCmdWaitEvents2.static voidvkCmdWriteBufferMarker2AMD(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long stage, long dstBuffer, long dstOffset, int marker)Execute a pipelined write of a marker value into a buffer.static voidvkCmdWriteTimestamp2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long stage, long queryPool, int query)SeeCmdWriteTimestamp2.static voidvkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, int[] pCheckpointDataCount, VkCheckpointData2NV.Buffer pCheckpointData)Array version of:GetQueueCheckpointData2NVstatic voidvkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, java.nio.IntBuffer pCheckpointDataCount, VkCheckpointData2NV.Buffer pCheckpointData)Retrieve diagnostic checkpoint data.static intvkQueueSubmit2KHR(org.lwjgl.vulkan.VkQueue queue, VkSubmitInfo2.Buffer pSubmits, long fence)SeeQueueSubmit2.
-
-
-
Field Detail
-
VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION
The extension specification version.
-
VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR, VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR, VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR, VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR
ExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_DEPENDENCY_INFO_KHRSTRUCTURE_TYPE_SUBMIT_INFO_2_KHRSTRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHRSTRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR
-
VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR
ExtendsVkEventCreateFlagBits.
-
VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR, VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR
ExtendsVkImageLayout.Enum values:
-
VK_PIPELINE_STAGE_NONE_KHR
ExtendsVkPipelineStageFlagBits.
-
VK_ACCESS_NONE_KHR
ExtendsVkAccessFlagBits.
-
VK_PIPELINE_STAGE_2_NONE_KHR, VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR, VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR, VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR, VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR, VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR, VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR, VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR, VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR, VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR, VK_PIPELINE_STAGE_2_HOST_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR, VK_PIPELINE_STAGE_2_COPY_BIT_KHR, VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR, VK_PIPELINE_STAGE_2_BLIT_BIT_KHR, VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR, VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR, VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR, VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR
ExtendsVkPipelineStageFlagBits2.Enum values:
PIPELINE_STAGE_2_NONE_KHRPIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHRPIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHRPIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHRPIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHRPIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHRPIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHRPIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHRPIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHRPIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHRPIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHRPIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHRPIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHRPIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHRPIPELINE_STAGE_2_TRANSFER_BITPIPELINE_STAGE_2_TRANSFER_BIT_KHRPIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHRPIPELINE_STAGE_2_HOST_BIT_KHRPIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHRPIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHRPIPELINE_STAGE_2_COPY_BIT_KHRPIPELINE_STAGE_2_RESOLVE_BIT_KHRPIPELINE_STAGE_2_BLIT_BIT_KHRPIPELINE_STAGE_2_CLEAR_BIT_KHRPIPELINE_STAGE_2_INDEX_INPUT_BIT_KHRPIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHRPIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR
-
VK_ACCESS_2_NONE_KHR, VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR, VK_ACCESS_2_INDEX_READ_BIT_KHR, VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR, VK_ACCESS_2_UNIFORM_READ_BIT_KHR, VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR, VK_ACCESS_2_SHADER_READ_BIT_KHR, VK_ACCESS_2_SHADER_WRITE_BIT_KHR, VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR, VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR, VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR, VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR, VK_ACCESS_2_TRANSFER_READ_BIT_KHR, VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR, VK_ACCESS_2_HOST_READ_BIT_KHR, VK_ACCESS_2_HOST_WRITE_BIT_KHR, VK_ACCESS_2_MEMORY_READ_BIT_KHR, VK_ACCESS_2_MEMORY_WRITE_BIT_KHR, VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR, VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR, VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR
ExtendsVkAccessFlagBits2.Enum values:
ACCESS_2_NONE_KHRACCESS_2_INDIRECT_COMMAND_READ_BIT_KHRACCESS_2_INDEX_READ_BIT_KHRACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHRACCESS_2_UNIFORM_READ_BIT_KHRACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHRACCESS_2_SHADER_READ_BIT_KHRACCESS_2_SHADER_WRITE_BIT_KHRACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHRACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHRACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHRACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHRACCESS_2_TRANSFER_READ_BIT_KHRACCESS_2_TRANSFER_WRITE_BIT_KHRACCESS_2_HOST_READ_BIT_KHRACCESS_2_HOST_WRITE_BIT_KHRACCESS_2_MEMORY_READ_BIT_KHRACCESS_2_MEMORY_WRITE_BIT_KHRACCESS_2_SHADER_SAMPLED_READ_BIT_KHRACCESS_2_SHADER_STORAGE_READ_BIT_KHRACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR
-
VK_SUBMIT_PROTECTED_BIT_KHR
ExtendsVkSubmitFlagBits.
-
VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
ExtendsVkAccessFlagBits2.Enum values:
-
VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT
ExtendsVkAccessFlagBits2.
-
VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV
ExtendsVkAccessFlagBits2.Enum values:
-
VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR
ExtendsVkAccessFlagBits2.
-
VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV
ExtendsVkAccessFlagBits2.
-
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR
ExtendsVkAccessFlagBits2.Enum values:
-
VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR
ExtendsVkPipelineStageFlagBits2.
-
VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV, VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV
ExtendsVkPipelineStageFlagBits2.Enum values:
-
VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV, VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV
ExtendsVkAccessFlagBits2.Enum values:
-
VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT
ExtendsVkPipelineStageFlagBits2.
-
VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT
ExtendsVkAccessFlagBits2.
-
VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV, VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV
ExtendsVkPipelineStageFlagBits2.Enum values:
-
-
Method Detail
-
nvkCmdSetEvent2KHR
public static void nvkCmdSetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, long pDependencyInfo)Unsafe version of:CmdSetEvent2KHR
-
vkCmdSetEvent2KHR
public static void vkCmdSetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, VkDependencyInfo pDependencyInfo)SeeCmdSetEvent2.- Parameters:
commandBuffer- the command buffer into which the command is recorded.event- the event that will be signaled.pDependencyInfo- a pointer to aVkDependencyInfostructure defining the first scopes of this operation.
-
vkCmdResetEvent2KHR
public static void vkCmdResetEvent2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long event, long stageMask)SeeCmdResetEvent2.- Parameters:
commandBuffer- the command buffer into which the command is recorded.event- the event that will be unsignaled.stageMask- aVkPipelineStageFlags2mask of pipeline stages used to determine the first synchronization scope.
-
nvkCmdWaitEvents2KHR
public static void nvkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int eventCount, long pEvents, long pDependencyInfos)Unsafe version of:CmdWaitEvents2KHR- Parameters:
eventCount- the length of thepEventsarray.
-
vkCmdWaitEvents2KHR
public static void vkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, java.nio.LongBuffer pEvents, VkDependencyInfo.Buffer pDependencyInfos)SeeCmdWaitEvents2.- Parameters:
commandBuffer- the command buffer into which the command is recorded.pEvents- a pointer to an array ofeventCountevents to wait on.pDependencyInfos- a pointer to an array ofeventCountVkDependencyInfostructures, defining the second synchronization scope.
-
nvkCmdPipelineBarrier2KHR
public static void nvkCmdPipelineBarrier2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pDependencyInfo)Unsafe version of:CmdPipelineBarrier2KHR
-
vkCmdPipelineBarrier2KHR
public static void vkCmdPipelineBarrier2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkDependencyInfo pDependencyInfo)SeeCmdPipelineBarrier2.- Parameters:
commandBuffer- the command buffer into which the command is recorded.pDependencyInfo- a pointer to aVkDependencyInfostructure defining the scopes of this operation.
-
vkCmdWriteTimestamp2KHR
public static void vkCmdWriteTimestamp2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long stage, long queryPool, int query)SeeCmdWriteTimestamp2.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.stage- specifies a stage of the pipeline.queryPool- the query pool that will manage the timestamp.query- the query within the query pool that will contain the timestamp.
-
nvkQueueSubmit2KHR
public static int nvkQueueSubmit2KHR(org.lwjgl.vulkan.VkQueue queue, int submitCount, long pSubmits, long fence)Unsafe version of:QueueSubmit2KHR- Parameters:
submitCount- the number of elements in thepSubmitsarray.
-
vkQueueSubmit2KHR
public static int vkQueueSubmit2KHR(org.lwjgl.vulkan.VkQueue queue, @Nullable VkSubmitInfo2.Buffer pSubmits, long fence)SeeQueueSubmit2.- Parameters:
queue- the queue that the command buffers will be submitted to.pSubmits- a pointer to an array ofVkSubmitInfo2structures, each specifying a command buffer submission batch.fence- an optional handle to a fence to be signaled once all submitted command buffers have completed execution. Iffenceis notNULL_HANDLE, it defines a fence signal operation.
-
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
vkCmdWriteBufferMarker2AMDcommands so long as their specified pipeline stages occur either at the same time or earlier than this command’s specifiedstage.While consecutive buffer marker writes with the same
stageparameter 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 theACCESS_TRANSFER_WRITE_BIT, and the pipeline stages for identifying the synchronization scope must include bothstageandPIPELINE_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
- If the geometry shaders feature is not enabled,
stagemust not containPIPELINE_STAGE_2_GEOMETRY_SHADER_BIT - If the tessellation shaders feature is not enabled,
stagemust not containPIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BITorPIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT - If the conditional rendering feature is not enabled,
stagemust not containPIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT - If the fragment density map feature is not enabled,
stagemust not containPIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT - If the transform feedback feature is not enabled,
stagemust not containPIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT - If the mesh shaders feature is not enabled,
stagemust not containPIPELINE_STAGE_2_MESH_SHADER_BIT_NV - If the task shaders feature is not enabled,
stagemust not containPIPELINE_STAGE_2_TASK_SHADER_BIT_NV - If the shading rate image feature is not enabled,
stagemust not containPIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV - If the subpass shading feature is not enabled,
stagemust not containPIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI - If the invocation mask image feature is not enabled,
stagemust not containPIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI - The
synchronization2feature must be enabled stagemust include only a single pipeline stagestagemust include only stages that are valid for the queue family that was used to create the command pool thatcommandBufferwas allocated fromdstOffsetmust be less than or equal to the size ofdstBufferminus 4dstBuffermust have been created with theBUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstOffsetmust be a multiple of 4
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlestagemust be a valid combination ofVkPipelineStageFlagBits2valuesdstBuffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - Both of
commandBuffer, anddstBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Both Transfer Graphics Compute - 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.
- If the geometry shaders feature is not enabled,
-
nvkGetQueueCheckpointData2NV
public static void nvkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, long pCheckpointDataCount, long pCheckpointData)Unsafe version of:GetQueueCheckpointData2NV- Parameters:
pCheckpointDataCount- a pointer to an integer related to the number of checkpoint markers available or queried, as described below.
-
vkGetQueueCheckpointData2NV
public static void vkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, java.nio.IntBuffer pCheckpointDataCount, @Nullable VkCheckpointData2NV.Buffer pCheckpointData)Retrieve diagnostic checkpoint data.C Specification
If the device encounters an error during execution, the implementation will return a
ERROR_DEVICE_LOSTerror to the application at some point during host execution. When this happens, the application can callGetQueueCheckpointData2NVto retrieve information on the most recent diagnostic checkpoints that were executed by the device.void vkGetQueueCheckpointData2NV( VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData);Description
If
pCheckpointDataisNULL, then the number of checkpoint markers available is returned inpCheckpointDataCount. Otherwise,pCheckpointDataCountmust point to a variable set by the user to the number of elements in thepCheckpointDataarray, and on return the variable is overwritten with the number of structures actually written topCheckpointData.If
pCheckpointDataCountis less than the number of checkpoint markers available, at mostpCheckpointDataCountstructures will be written.Valid Usage
- The device that
queuebelongs to must be in the lost state
Valid Usage (Implicit)
queuemust be a validVkQueuehandlepCheckpointDataCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pCheckpointDataCountis not 0, andpCheckpointDatais notNULL,pCheckpointDatamust be a valid pointer to an array ofpCheckpointDataCountVkCheckpointData2NVstructures
See Also
- Parameters:
queue- theVkQueueobject the caller would like to retrieve checkpoint data forpCheckpointDataCount- a pointer to an integer related to the number of checkpoint markers available or queried, as described below.pCheckpointData- eitherNULLor a pointer to an array ofVkCheckpointData2NVstructures.
- The device that
-
vkCmdWaitEvents2KHR
public static void vkCmdWaitEvents2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long[] pEvents, VkDependencyInfo.Buffer pDependencyInfos)Array version of:CmdWaitEvents2KHR
-
vkGetQueueCheckpointData2NV
public static void vkGetQueueCheckpointData2NV(org.lwjgl.vulkan.VkQueue queue, int[] pCheckpointDataCount, @Nullable VkCheckpointData2NV.Buffer pCheckpointData)Array version of:GetQueueCheckpointData2NV
-
-