vulkan-3.13.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_dynamic_rendering

Description

Name

VK_KHR_dynamic_rendering - device extension

VK_KHR_dynamic_rendering

Name String
VK_KHR_dynamic_rendering
Extension Type
Device extension
Registered Extension Number
45
Revision
1
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_KHR_get_physical_device_properties2
Contact
Extension Proposal
VK_KHR_dynamic_rendering

Other Extension Metadata

Last Modified Date
2021-10-06
Contributors
  • Tobias Hector, AMD
  • Arseny Kapoulkine, Roblox
  • François Duranleau, Gameloft
  • Stuart Smith, AMD
  • Hai Nguyen, Google
  • Jean-François Roy, Google
  • Jeff Leger, Qualcomm
  • Jan-Harald Fredriksen, Arm
  • Piers Daniell, Nvidia
  • James Fitzpatrick, Imagination
  • Piotr Byszewski, Mobica
  • Jesse Hall, Google
  • Mike Blumenkrantz, Valve

Description

This extension allows applications to create single-pass render pass instances without needing to create render pass objects or framebuffers. Dynamic render passes can also span across multiple primary command buffers, rather than relying on secondary command buffers.

This extension also incorporates ATTACHMENT_STORE_OP_NONE_KHR from VK_QCOM_render_pass_store_ops, enabling applications to avoid unnecessary synchronization when an attachment is not written during a render pass.

New Commands

New Structures

If VK_AMD_mixed_attachment_samples is supported:

If VK_EXT_fragment_density_map is supported:

If VK_KHR_fragment_shading_rate is supported:

If VK_NV_framebuffer_mixed_samples is supported:

If VK_NVX_multiview_per_view_attributes is supported:

New Enums

New Bitmasks

New Enum Constants

If VK_AMD_mixed_attachment_samples is supported:

If VK_EXT_fragment_density_map is supported:

If VK_KHR_fragment_shading_rate is supported:

If VK_NV_framebuffer_mixed_samples is supported:

If VK_NVX_multiview_per_view_attributes is supported:

Version History

  • Revision 1, 2021-10-06 (Tobias Hector)

    • Initial revision

See Also

CommandBufferInheritanceRenderingInfoKHR, PhysicalDeviceDynamicRenderingFeaturesKHR, PipelineRenderingCreateInfoKHR, RenderingAttachmentInfoKHR, RenderingFlagBitsKHR, RenderingFlagsKHR, RenderingInfoKHR, cmdBeginRenderingKHR, cmdEndRenderingKHR

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.

Synopsis

Documentation

cmdBeginRenderingKHR Source #

Arguments

:: forall a io. (Extendss RenderingInfoKHR a, PokeChain a, MonadIO io) 
=> CommandBuffer

commandBuffer is the command buffer in which to record the command.

-> RenderingInfoKHR a

pRenderingInfo is a pointer to a RenderingInfoKHR structure specifying details of the render pass instance to begin.

-> io () 

vkCmdBeginRenderingKHR - Begin a dynamic render pass instance

Description

After beginning a render pass instance, the command buffer is ready to record draw commands.

If pRenderingInfo->flags includes RENDERING_RESUMING_BIT_KHR then this render pass is resumed from a render pass instance that has been suspended earlier in submission order.

Valid Usage

Valid Usage (Implicit)

  • pRenderingInfo must be a valid pointer to a valid RenderingInfoKHR structure
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a render pass instance

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutside Graphics

See Also

VK_KHR_dynamic_rendering, CommandBuffer, RenderingInfoKHR

cmdUseRenderingKHR :: forall a io r. (Extendss RenderingInfoKHR a, PokeChain a, MonadIO io) => CommandBuffer -> RenderingInfoKHR a -> io r -> io r Source #

This function will call the supplied action between calls to cmdBeginRenderingKHR and cmdEndRenderingKHR

Note that cmdEndRenderingKHR is *not* called if an exception is thrown by the inner action.

cmdEndRenderingKHR Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer in which to record the command.

-> io () 

vkCmdEndRenderingKHR - End a dynamic render pass instance

Description

If the value of pRenderingInfo->flags used to begin this render pass instance included RENDERING_SUSPENDING_BIT_KHR, then this render pass is suspended and will be resumed later in submission order.

Valid Usage

  • The current render pass instance must have been begun in commandBuffer

Valid Usage (Implicit)

  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called inside of a render pass instance

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInside Graphics

See Also

VK_KHR_dynamic_rendering, CommandBuffer

data PipelineRenderingCreateInfoKHR Source #

VkPipelineRenderingCreateInfoKHR - Structure specifying attachment formats

Description

When a pipeline is created without a RenderPass, if this structure is present in the pNext chain of GraphicsPipelineCreateInfo, it specifies the view mask and format of attachments used for rendering. If this structure is not specified, and the pipeline does not include a RenderPass, viewMask and colorAttachmentCount are 0, and depthAttachmentFormat and stencilAttachmentFormat are FORMAT_UNDEFINED. If a graphics pipeline is created with a valid RenderPass, parameters of this structure are ignored.

If depthAttachmentFormat, stencilAttachmentFormat, or any element of pColorAttachmentFormats is FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the render pass. Valid formats indicate that an attachment can be used - but it is still valid to set the attachment to NULL when beginning rendering.

Valid Usage

Valid Usage (Implicit)

  • If colorAttachmentCount is not 0, pColorAttachmentFormats must be a valid pointer to an array of colorAttachmentCount valid Format values
  • depthAttachmentFormat must be a valid Format value
  • stencilAttachmentFormat must be a valid Format value

See Also

VK_KHR_dynamic_rendering, Format, StructureType

Constructors

PipelineRenderingCreateInfoKHR 

Fields

data RenderingInfoKHR (es :: [Type]) Source #

VkRenderingInfoKHR - Structure specifying render pass instance begin info

Description

If viewMask is not 0, multiview is enabled.

If there is an instance of DeviceGroupRenderPassBeginInfo included in the pNext chain and its deviceCount member is not 0, then renderArea is ignored, and the render area is defined per-device by that structure.

Each element of the pColorAttachments array corresponds to an output location in the shader, i.e. if the shader declares an output variable decorated with a Location value of X, then it uses the attachment provided in pColorAttachments[X]. If the imageView member of any element of pColorAttachments is NULL_HANDLE, writes to the corresponding location by a fragment are discarded.

Valid Usage

  • If viewMask is 0, layerCount must not be 0

Valid Usage (Implicit)

See Also

VK_KHR_dynamic_rendering, Rect2D, RenderingAttachmentInfoKHR, RenderingFlagsKHR, StructureType, cmdBeginRenderingKHR

Constructors

RenderingInfoKHR 

Fields

data RenderingAttachmentInfoKHR Source #

VkRenderingAttachmentInfoKHR - Structure specifying attachment information

Description

Values in imageView are loaded and stored according to the values of loadOp and storeOp, within the render area for each device specified in RenderingInfoKHR. If imageView is NULL_HANDLE, other members of this structure are ignored; writes to this attachment will be discarded, and no load, store, or resolve operations will be performed.

If resolveMode is RESOLVE_MODE_NONE, then resolveImageView is ignored. If resolveMode is not RESOLVE_MODE_NONE, values in resolveImageView within the render area become undefined once rendering begins. At the end of rendering, the color values written to each pixel location in imageView will be resolved according to resolveMode and stored into the the same location in resolveImageView.

Note

The resolve mode and store operation are independent; it is valid to write both resolved and unresolved values, and equally valid to discard the unresolved values while writing the resolved ones.

Store and resolve operations are only performed at the end of a render pass instance that does not specify the RENDERING_SUSPENDING_BIT_KHR flag.

Load operations are only performed at the beginning of a render pass instance that does not specify the RENDERING_RESUMING_BIT_KHR flag.

Image contents at the end of a suspended render pass instance remain defined for access by a resuming render pass instance.

Valid Usage

Valid Usage (Implicit)

  • pNext must be NULL
  • If imageView is not NULL_HANDLE, imageView must be a valid ImageView handle
  • imageLayout must be a valid ImageLayout value
  • If resolveMode is not 0, resolveMode must be a valid ResolveModeFlagBits value
  • If resolveImageView is not NULL_HANDLE, resolveImageView must be a valid ImageView handle
  • resolveImageLayout must be a valid ImageLayout value
  • loadOp must be a valid AttachmentLoadOp value
  • storeOp must be a valid AttachmentStoreOp value
  • clearValue must be a valid ClearValue union
  • Both of imageView, and resolveImageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

See Also

VK_KHR_dynamic_rendering, AttachmentLoadOp, AttachmentStoreOp, ClearValue, ImageLayout, ImageView, RenderingInfoKHR, ResolveModeFlagBits, StructureType

Constructors

RenderingAttachmentInfoKHR 

Fields

data RenderingFragmentShadingRateAttachmentInfoKHR Source #

VkRenderingFragmentShadingRateAttachmentInfoKHR - Structure specifying fragment shading rate attachment information

Description

This structure can be included in the pNext chain of RenderingInfoKHR to define a fragment shading rate attachment. If imageView is NULL_HANDLE, or if this structure is not specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.

Valid Usage

Valid Usage (Implicit)

See Also

VK_KHR_dynamic_rendering, VK_KHR_fragment_shading_rate, Extent2D, ImageLayout, ImageView, StructureType

Constructors

RenderingFragmentShadingRateAttachmentInfoKHR 

Fields

Instances

Instances details
Show RenderingFragmentShadingRateAttachmentInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Storable RenderingFragmentShadingRateAttachmentInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

FromCStruct RenderingFragmentShadingRateAttachmentInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

ToCStruct RenderingFragmentShadingRateAttachmentInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Zero RenderingFragmentShadingRateAttachmentInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

data RenderingFragmentDensityMapAttachmentInfoEXT Source #

VkRenderingFragmentDensityMapAttachmentInfoEXT - Structure specifying fragment shading rate attachment information

Description

This structure can be included in the pNext chain of RenderingInfoKHR to define a fragment density map. If imageView is NULL_HANDLE, or if this structure is not specified, imageView is NULL_HANDLE.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_fragment_density_map, VK_KHR_dynamic_rendering, ImageLayout, ImageView, StructureType

Constructors

RenderingFragmentDensityMapAttachmentInfoEXT 

Fields

  • imageView :: ImageView

    imageView is the image view that will be used as a fragment shading rate attachment.

  • imageLayout :: ImageLayout

    imageLayout is the layout that imageView will be in during rendering.

Instances

Instances details
Eq RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Show RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Storable RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

FromCStruct RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

ToCStruct RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Zero RenderingFragmentDensityMapAttachmentInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

data PhysicalDeviceDynamicRenderingFeaturesKHR Source #

VkPhysicalDeviceDynamicRenderingFeaturesKHR - Structure indicating support for dynamic render pass instances

Members

The members of the PhysicalDeviceDynamicRenderingFeaturesKHR structure describe the following features:

Description

If the PhysicalDeviceDynamicRenderingFeaturesKHR structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. PhysicalDeviceDynamicRenderingFeaturesKHR can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_KHR_dynamic_rendering, Bool32, StructureType

Constructors

PhysicalDeviceDynamicRenderingFeaturesKHR 

Fields

Instances

Instances details
Eq PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Show PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Storable PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

FromCStruct PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

ToCStruct PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Zero PhysicalDeviceDynamicRenderingFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

data CommandBufferInheritanceRenderingInfoKHR Source #

VkCommandBufferInheritanceRenderingInfoKHR - Structure specifying command buffer inheritance info for dynamic render pass instances

Description

If the pNext chain of CommandBufferInheritanceInfo includes a CommandBufferInheritanceRenderingInfoKHR structure, then that structure controls parameters of dynamic render pass instances that the CommandBuffer can be executed within. If CommandBufferInheritanceInfo::renderPass is not NULL_HANDLE, or COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in CommandBufferBeginInfo::flags, parameters of this structure are ignored.

If colorAttachmentCount is 0 and the variableMultisampleRate feature is enabled, rasterizationSamples is ignored.

If depthAttachmentFormat, stencilAttachmentFormat, or any element of pColorAttachmentFormats is FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the render pass.

Valid Usage

  • If colorAttachmentCount is not 0, rasterizationSamples must be a valid SampleCountFlagBits value

Valid Usage (Implicit)

  • flags must be a valid combination of RenderingFlagBitsKHR values
  • pColorAttachmentFormats must be a valid pointer to an array of colorAttachmentCount valid Format values
  • depthAttachmentFormat must be a valid Format value
  • stencilAttachmentFormat must be a valid Format value
  • If rasterizationSamples is not 0, rasterizationSamples must be a valid SampleCountFlagBits value
  • colorAttachmentCount must be greater than 0

See Also

VK_KHR_dynamic_rendering, Format, RenderingFlagsKHR, SampleCountFlagBits, StructureType

Constructors

CommandBufferInheritanceRenderingInfoKHR 

Fields

data AttachmentSampleCountInfoAMD Source #

VkAttachmentSampleCountInfoAMD - Structure specifying command buffer inheritance info for dynamic render pass instances

Description

If CommandBufferInheritanceInfo::renderPass is NULL_HANDLE, COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is specified in CommandBufferBeginInfo::flags, and the pNext chain of CommandBufferInheritanceInfo includes AttachmentSampleCountInfoAMD, then this structure defines the sample counts of each attachment within the render pass instance. If AttachmentSampleCountInfoAMD is not included, the value of CommandBufferInheritanceRenderingInfoKHR::rasterizationSamples is used as the sample count for each attachment. If CommandBufferInheritanceInfo::renderPass is not NULL_HANDLE, or COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in CommandBufferBeginInfo::flags, parameters of this structure are ignored.

AttachmentSampleCountInfoAMD can also be included in the pNext chain of GraphicsPipelineCreateInfo. When a graphics pipeline is created without a RenderPass, if this structure is present in the pNext chain of GraphicsPipelineCreateInfo, it specifies the sample count of attachments used for rendering. If this structure is not specified, and the pipeline does not include a RenderPass, the value of PipelineMultisampleStateCreateInfo::rasterizationSamples is used as the sample count for each attachment. If a graphics pipeline is created with a valid RenderPass, parameters of this structure are ignored.

Valid Usage (Implicit)

  • pColorAttachmentSamples must be a valid pointer to an array of colorAttachmentCount valid or NULL_HANDLE SampleCountFlagBits values
  • If depthStencilAttachmentSamples is not 0, depthStencilAttachmentSamples must be a valid SampleCountFlagBits value
  • colorAttachmentCount must be greater than 0

See Also

VK_AMD_mixed_attachment_samples, VK_KHR_dynamic_rendering, VK_NV_framebuffer_mixed_samples, SampleCountFlagBits, StructureType

Constructors

AttachmentSampleCountInfoAMD 

Fields

data MultiviewPerViewAttributesInfoNVX Source #

VkMultiviewPerViewAttributesInfoNVX - Structure specifying the multiview per-attribute properties

Description

When dynamic render pass instances are being used, instead of specifying SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX or SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX in the subpass description flags, the per-attibute properties of the render pass instance must be specified by the MultiviewPerViewAttributesInfoNVX structure Include the MultiviewPerViewAttributesInfoNVX structure in the pNext chain of GraphicsPipelineCreateInfo when creating a graphics pipeline for dynamic rendering, RenderingInfoKHR when starting a dynamic render pass instance, and CommandBufferInheritanceInfo when specifying the dynamic render pass instance parameters for secondary command buffers.

Valid Usage

  • If perViewAttributesPositionXOnly is TRUE then perViewAttributes must also be TRUE

Valid Usage (Implicit)

See Also

VK_KHR_dynamic_rendering, VK_NVX_multiview_per_view_attributes, Bool32, StructureType

Constructors

MultiviewPerViewAttributesInfoNVX 

Fields

  • perViewAttributes :: Bool

    perViewAttributes specifies that shaders compiled for this pipeline write the attributes for all views in a single invocation of each vertex processing stage. All pipelines executed within a render pass instance that includes this bit must write per-view attributes to the *PerViewNV[] shader outputs, in addition to the non-per-view (e.g. Position) outputs.

  • perViewAttributesPositionXOnly :: Bool

    perViewAttributesPositionXOnly specifies that shaders compiled for this pipeline use per-view positions which only differ in value in the x component. Per-view viewport mask can also be used.

Instances

Instances details
Eq MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Show MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Storable MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

FromCStruct MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

ToCStruct MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Zero MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

newtype RenderingFlagBitsKHR Source #

VkRenderingFlagBitsKHR - Bitmask specifying additional properties of a dynamic render pass instance

Description

The contents of pRenderingInfo must match between suspended render pass instances and the render pass instances that resume them, other than the presence or absence of the RENDERING_RESUMING_BIT_KHR, RENDERING_SUSPENDING_BIT_KHR, and RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR flags. No action or synchronization commands, or other render pass instances, are allowed between suspending and resuming render pass instances.

See Also

VK_KHR_dynamic_rendering, RenderingFlagsKHR

Bundled Patterns

pattern RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR :: RenderingFlagBitsKHR

RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR specifies that draw calls for the render pass instance will be recorded in secondary command buffers.

pattern RENDERING_SUSPENDING_BIT_KHR :: RenderingFlagBitsKHR

RENDERING_SUSPENDING_BIT_KHR specifies that the render pass instance will be suspended.

pattern RENDERING_RESUMING_BIT_KHR :: RenderingFlagBitsKHR

RENDERING_RESUMING_BIT_KHR specifies that the render pass instance is resuming an earlier suspended render pass instance.

Instances

Instances details
Eq RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Ord RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Read RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Show RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Storable RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Bits RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

FiniteBits RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

Zero RenderingFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_dynamic_rendering

type KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering" Source #

pattern KHR_DYNAMIC_RENDERING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #