C Specification
Bits which can be set in the srcAccessMask and dstAccessMask
members of VkSubpassDependency,
VkSubpassDependency2,
VkMemoryBarrier, VkBufferMemoryBarrier, and
VkImageMemoryBarrier, specifying access behavior, are:
// Provided by VK_VERSION_1_0
typedef enum VkAccessFlagBits {
VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
VK_ACCESS_INDEX_READ_BIT = 0x00000002,
VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
VK_ACCESS_SHADER_READ_BIT = 0x00000020,
VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
VK_ACCESS_HOST_READ_BIT = 0x00002000,
VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
// Provided by VK_VERSION_1_3
VK_ACCESS_NONE = 0,
// Provided by VK_EXT_transform_feedback
VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000,
// Provided by VK_EXT_transform_feedback
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000,
// Provided by VK_EXT_transform_feedback
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000,
// Provided by VK_EXT_conditional_rendering
VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000,
// Provided by VK_EXT_blend_operation_advanced
VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
// Provided by VK_KHR_acceleration_structure
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000,
// Provided by VK_KHR_acceleration_structure
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000,
// Provided by VK_EXT_fragment_density_map
VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000,
// Provided by VK_KHR_fragment_shading_rate
VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000,
// Provided by VK_NV_device_generated_commands
VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000,
// Provided by VK_NV_device_generated_commands
VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000,
// Provided by VK_NV_shading_rate_image
VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR,
// Provided by VK_NV_ray_tracing
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR,
// Provided by VK_NV_ray_tracing
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
// Provided by VK_KHR_synchronization2
VK_ACCESS_NONE_KHR = VK_ACCESS_NONE,
} VkAccessFlagBits;
Description
These values all have the same meaning as the equivalently named values for VkAccessFlags2.
-
VK_ACCESS_NONEspecifies no accesses. -
VK_ACCESS_MEMORY_READ_BITspecifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting allREADaccess flags that are valid where it is used. -
VK_ACCESS_MEMORY_WRITE_BITspecifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting allWRITEaccess flags that are valid where it is used. -
VK_ACCESS_INDIRECT_COMMAND_READ_BITspecifies read access to indirect command data read as part of an indirect build, trace, drawing or dispatching command. Such access occurs in theVK_PIPELINE_STAGE_DRAW_INDIRECT_BITpipeline stage. -
VK_ACCESS_INDEX_READ_BITspecifies read access to an index buffer as part of an indexed drawing command, bound by vkCmdBindIndexBuffer2KHR and vkCmdBindIndexBuffer. Such access occurs in theVK_PIPELINE_STAGE_VERTEX_INPUT_BITpipeline stage. -
VK_ACCESS_VERTEX_ATTRIBUTE_READ_BITspecifies read access to a vertex buffer as part of a drawing command, bound by vkCmdBindVertexBuffers. Such access occurs in theVK_PIPELINE_STAGE_VERTEX_INPUT_BITpipeline stage. -
VK_ACCESS_UNIFORM_READ_BITspecifies read access to a uniform buffer in any shader pipeline stage. -
VK_ACCESS_INPUT_ATTACHMENT_READ_BITspecifies read access to an input attachment within a render pass during subpass shading or fragment shading. Such access occurs in theVK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEIorVK_PIPELINE_STAGE_FRAGMENT_SHADER_BITpipeline stage. -
VK_ACCESS_SHADER_READ_BITspecifies read access to a uniform texel buffer, sampled image, storage buffer, physical storage buffer, shader binding table, storage texel buffer, or storage image in any shader pipeline stage. -
VK_ACCESS_SHADER_WRITE_BITspecifies write access to a storage buffer, physical storage buffer, storage texel buffer, or storage image in any shader pipeline stage. -
VK_ACCESS_COLOR_ATTACHMENT_READ_BITspecifies read access to a color attachment, such as via blending (other than advanced blend operations), logic operations or certain render pass load operations in theVK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BITpipeline stage or via fragment shader tile image reads in theVK_PIPELINE_STAGE_FRAGMENT_SHADER_BITpipeline stage. -
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BITspecifies write access to a color, resolve, or depth/stencil resolve attachment during a render pass or via certain render pass load and store operations. Such access occurs in theVK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BITpipeline stage. -
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BITspecifies read access to a depth/stencil attachment, via depth or stencil operations or certain render pass load operations in theVK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BITorVK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BITpipeline stages or via fragment shader tile image reads in theVK_PIPELINE_STAGE_FRAGMENT_SHADER_BITpipeline stage. -
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BITspecifies write access to a depth/stencil attachment, via depth or stencil operations or certain render pass load and store operations. Such access occurs in theVK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BITorVK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BITpipeline stages. -
VK_ACCESS_TRANSFER_READ_BITspecifies read access to an image or buffer in a copy operation. Such access occurs in theVK_PIPELINE_STAGE_2_ALL_TRANSFER_BITpipeline stage. -
VK_ACCESS_TRANSFER_WRITE_BITspecifies write access to an image or buffer in a clear or copy operation. Such access occurs in theVK_PIPELINE_STAGE_2_ALL_TRANSFER_BITpipeline stage. -
VK_ACCESS_HOST_READ_BITspecifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in theVK_PIPELINE_STAGE_HOST_BITpipeline stage. -
VK_ACCESS_HOST_WRITE_BITspecifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in theVK_PIPELINE_STAGE_HOST_BITpipeline stage. -
VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXTspecifies read access to a predicate as part of conditional rendering. Such access occurs in theVK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXTpipeline stage. -
VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXTspecifies write access to a transform feedback buffer made when transform feedback is active. Such access occurs in theVK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXTpipeline stage. -
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXTspecifies read access to a transform feedback counter buffer which is read whenvkCmdBeginTransformFeedbackEXTexecutes. Such access occurs in theVK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXTpipeline stage. -
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXTspecifies write access to a transform feedback counter buffer which is written whenvkCmdEndTransformFeedbackEXTexecutes. Such access occurs in theVK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXTpipeline stage. -
VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NVspecifies reads from buffer inputs to vkCmdPreprocessGeneratedCommandsNV. Such access occurs in theVK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NVpipeline stage. -
VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NVspecifies writes to the target command buffer preprocess outputs in vkCmdPreprocessGeneratedCommandsNV. Such access occurs in theVK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NVpipeline stage. -
VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXTspecifies read access to color attachments, including advanced blend operations. Such access occurs in theVK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BITpipeline stage. -
VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEIspecifies read access to a invocation mask image in theVK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEIpipeline stage. -
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHRspecifies read access to an acceleration structure as part of a trace, build, or copy command, or to an acceleration structure scratch buffer as part of a build command. Such access occurs in theVK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHRpipeline stage orVK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHRpipeline stage. -
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHRspecifies write access to an acceleration structure or acceleration structure scratch buffer as part of a build or copy command. Such access occurs in theVK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHRpipeline stage. -
VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXTspecifies read access to a fragment density map attachment during dynamic fragment density map operations Such access occurs in theVK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXTpipeline stage. -
VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHRspecifies read access to a fragment shading rate attachment during rasterization. Such access occurs in theVK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHRpipeline stage. -
VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NVspecifies read access to a shading rate image during rasterization. Such access occurs in theVK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NVpipeline stage. It is equivalent toVK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR.
Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.
| Access flag | Supported pipeline stages |
|---|---|
|
Any |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any |
|
Any |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.