| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_synchronization2
Description
Name
VK_KHR_synchronization2 - device extension
VK_KHR_synchronization2
- Name String
VK_KHR_synchronization2
- Extension Type
- Device extension
- Registered Extension Number
- 315
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2 or Vulkan Version 1.1
- API Interactions
- Interacts with VK_EXT_blend_operation_advanced
- Interacts with VK_EXT_conditional_rendering
- Interacts with VK_EXT_device_generated_commands
- Interacts with VK_EXT_fragment_density_map
- Interacts with VK_EXT_mesh_shader
- Interacts with VK_EXT_transform_feedback
- Interacts with VK_KHR_acceleration_structure
- Interacts with VK_KHR_fragment_shading_rate
- Interacts with VK_KHR_ray_tracing_pipeline
- Interacts with VK_NV_device_generated_commands
- Interacts with VK_NV_mesh_shader
- Interacts with VK_NV_ray_tracing
- Interacts with VK_NV_shading_rate_image
- Deprecation State
- Promoted to Vulkan 1.3
- Contact
Other Extension Metadata
- Last Modified Date
- 2020-12-03
- Interactions and External Dependencies
- Interacts with
VK_KHR_create_renderpass2
- Interacts with
- Contributors
- Tobias Hector
Description
This 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_READ and MEMORY_WRITE flags 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_KHR and
IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR layouts which are contextually
applied based on the image format. For example, for a depth format
image, IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR is equivalent to
IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR.
IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR also functionally replaces
IMAGE_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, and VK_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.
- Extensions with commands or functions with a
PipelineStageFlagsorPipelineStageFlagBitsparameter have had those APIs replaced with equivalents usingPipelineStageFlags2KHR. - 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. MemoryBarrier2KHRcan be chained toSubpassDependency2, overriding the original 32-bit stage and access masks.
New Base Types
New Commands
New Structures
CommandBufferSubmitInfoKHRDependencyInfoKHRImageMemoryBarrier2KHRSemaphoreSubmitInfoKHRSubmitInfo2KHRExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
SubpassDependency2:
New Enums
New Bitmasks
New Enum Constants
KHR_SYNCHRONIZATION_2_SPEC_VERSIONExtending
AccessFlagBits:Extending
AccessFlagBits2:ACCESS_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_HOST_READ_BIT_KHRACCESS_2_HOST_WRITE_BIT_KHRACCESS_2_INDEX_READ_BIT_KHRACCESS_2_INDIRECT_COMMAND_READ_BIT_KHRACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHRACCESS_2_MEMORY_READ_BIT_KHRACCESS_2_MEMORY_WRITE_BIT_KHRACCESS_2_NONE_KHRACCESS_2_SHADER_READ_BIT_KHRACCESS_2_SHADER_SAMPLED_READ_BIT_KHRACCESS_2_SHADER_STORAGE_READ_BIT_KHRACCESS_2_SHADER_STORAGE_WRITE_BIT_KHRACCESS_2_SHADER_WRITE_BIT_KHRACCESS_2_TRANSFER_READ_BIT_KHRACCESS_2_TRANSFER_WRITE_BIT_KHRACCESS_2_UNIFORM_READ_BIT_KHRACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR
Extending
EventCreateFlagBits:Extending
ImageLayout:Extending
PipelineStageFlagBits:Extending
PipelineStageFlagBits2:PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHRPIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHRPIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHRPIPELINE_STAGE_2_BLIT_BIT_KHRPIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHRPIPELINE_STAGE_2_CLEAR_BIT_KHRPIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHRPIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHRPIPELINE_STAGE_2_COPY_BIT_KHRPIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHRPIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHRPIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHRPIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHRPIPELINE_STAGE_2_HOST_BIT_KHRPIPELINE_STAGE_2_INDEX_INPUT_BIT_KHRPIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHRPIPELINE_STAGE_2_NONE_KHRPIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHRPIPELINE_STAGE_2_RESOLVE_BIT_KHRPIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHRPIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHRPIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHRPIPELINE_STAGE_2_TRANSFER_BIT_KHRPIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHRPIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHRPIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR
Extending
StructureType:STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHRSTRUCTURE_TYPE_DEPENDENCY_INFO_KHRSTRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_MEMORY_BARRIER_2_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHRSTRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHRSTRUCTURE_TYPE_SUBMIT_INFO_2_KHR
Extending
SubmitFlagBits:
If VK_EXT_blend_operation_advanced is supported:
If VK_EXT_conditional_rendering is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_EXT_device_generated_commands is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_EXT_fragment_density_map is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_EXT_mesh_shader is supported:
Extending
PipelineStageFlagBits2:
If VK_EXT_transform_feedback is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_KHR_acceleration_structure is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_KHR_fragment_shading_rate is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_KHR_ray_tracing_pipeline is supported:
If VK_NV_device_generated_commands is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_NV_mesh_shader is supported:
Extending
PipelineStageFlagBits2:
If VK_NV_ray_tracing is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
If VK_NV_shading_rate_image is supported:
Extending
AccessFlagBits2:Extending
PipelineStageFlagBits2:
Promotion to Vulkan 1.3
Vulkan APIs in this extension are included in core Vulkan 1.3, with the KHR suffix omitted. External interactions defined by this extension, such as SPIR-V token names, retain their original names. The original Vulkan API names are still available as aliases of the core functionality.
Examples
See https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples
Version History
Revision 1, 2020-12-03 (Tobias Hector)
- Internal revisions
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Documentation
pattern STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR :: StructureType Source #
pattern STRUCTURE_TYPE_DEPENDENCY_INFO_KHR :: StructureType Source #
pattern STRUCTURE_TYPE_SUBMIT_INFO_2_KHR :: StructureType Source #
pattern IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR :: ImageLayout Source #
pattern IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR :: ImageLayout Source #
pattern PIPELINE_STAGE_NONE_KHR :: PipelineStageFlagBits Source #
pattern ACCESS_NONE_KHR :: AccessFlagBits Source #
pattern ACCESS_2_NONE_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_INDEX_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_UNIFORM_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_SHADER_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_SHADER_WRITE_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_TRANSFER_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_TRANSFER_WRITE_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_HOST_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_HOST_WRITE_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_MEMORY_READ_BIT_KHR :: AccessFlagBits2 Source #
pattern ACCESS_2_MEMORY_WRITE_BIT_KHR :: AccessFlagBits2 Source #
pattern PIPELINE_STAGE_2_NONE_KHR :: PipelineStageFlagBits2 Source #
pattern SUBMIT_PROTECTED_BIT_KHR :: SubmitFlagBits Source #
cmdSetEvent2KHR :: forall {a :: [Type]} {io}. (Extendss DependencyInfo a, PokeChain a, MonadIO io) => CommandBuffer -> Event -> DependencyInfo a -> io () Source #
cmdResetEvent2KHR :: MonadIO io => CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags2) -> io () Source #
cmdWaitEvents2KHR :: MonadIO io => CommandBuffer -> ("events" ::: Vector Event) -> ("dependencyInfos" ::: Vector (SomeStruct DependencyInfo)) -> io () Source #
cmdPipelineBarrier2KHR :: forall {a :: [Type]} {io}. (Extendss DependencyInfo a, PokeChain a, MonadIO io) => CommandBuffer -> DependencyInfo a -> io () Source #
queueSubmit2KHR :: MonadIO io => Queue -> ("submits" ::: Vector (SomeStruct SubmitInfo2)) -> Fence -> io () Source #
cmdWriteTimestamp2KHR :: MonadIO io => CommandBuffer -> PipelineStageFlags2 -> QueryPool -> ("query" ::: Word32) -> io () Source #
type AccessFlags2KHR = AccessFlags2 Source #
type SubmitFlagsKHR = SubmitFlags Source #
type AccessFlagBits2KHR = AccessFlagBits2 Source #
type SubmitFlagBitsKHR = SubmitFlagBits Source #
type MemoryBarrier2KHR = MemoryBarrier2 Source #
type DependencyInfoKHR = DependencyInfo Source #
type SubmitInfo2KHR = SubmitInfo2 Source #
type KHR_SYNCHRONIZATION_2_SPEC_VERSION = 1 Source #
pattern KHR_SYNCHRONIZATION_2_SPEC_VERSION :: Integral a => a Source #
type KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2" Source #
pattern KHR_SYNCHRONIZATION_2_EXTENSION_NAME :: (Eq a, IsString a) => a Source #