vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_custom_resolve

Description

Name

VK_EXT_custom_resolve - device extension

VK_EXT_custom_resolve

Name String
VK_EXT_custom_resolve
Extension Type
Device extension
Registered Extension Number
629
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_VERSION_1_3
  • Interacts with VK_KHR_dynamic_rendering
Contact
Extension Proposal
VK_EXT_custom_resolve

Other Extension Metadata

Last Modified Date
2025-05-13
IP Status
No known IP claims.
Interactions and External Dependencies
  • This extension interacts with VK_KHR_dynamic_rendering
  • This extension interacts with VK_EXT_dynamic_rendering_unused_attachments
  • This extension interacts with VK_EXT_fragment_density_map
  • This extension interacts with VK_EXT_graphics_pipeline_library
  • This extension interacts with VK_EXT_shader_object
Contributors
  • Mike Blumenkrantz, Valve
  • Connor Abbott, Valve
  • Samuel Pitoiset, Valve
  • Matthew Netsch, Qualcomm
  • Jan-Harald Fredriksen, ARM
  • Ting Wei, ARM
  • Ricardo Garcia, Igalia
  • Spencer Fricke, LunarG
  • Piers Daniell, Nvidia

Description

This extension provides functionality for using shaders to resolve multisample rendering attachments.

It builds upon mechanics introduced by VK_QCOM_render_pass_shader_resolve, additionally adding support for dynamic rendering.

New Commands

If VK_KHR_dynamic_rendering or Vulkan Version 1.3 is supported:

New Structures

If VK_KHR_dynamic_rendering or Vulkan Version 1.3 is supported:

New Enum Constants

If VK_KHR_dynamic_rendering or Vulkan Version 1.3 is supported:

Issues

1) How will this work with shader objects?

Some vendors emit an epilog at the end of the FS that stores each color/depth/stencil attachment to the appropriate tilebuffer location, and to do that they need to know the layout of the tilebuffer which depends on the attachment formats/sample counts. We agreed that for shader object the FS epilog is emitted dynamically when the draw happens.

Version History

  • Revision 1, 2025-05-13 (Mike Blumenkrantz)

    • Initial draft

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.

Synopsis

Documentation

cmdBeginCustomResolveEXT Source #

Arguments

:: MonadIO io 
=> CommandBuffer

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

-> ("beginCustomResolveInfo" ::: Maybe BeginCustomResolveInfoEXT)

pBeginCustomResolveInfo is an optional struct with which to extend functionality.

-> io () 

vkCmdBeginCustomResolveEXT - Begins a shader resolve operation

Description

Following this call, any resolveImageView with resolveMode set to RESOLVE_MODE_CUSTOM_BIT_EXT will be written by outputs which would otherwise have written to the imageView image until the end of the current render pass instance.

Following this call, the fragment area may be reduced to (1,1) if a fragment density map is attached. If this occurs, reads of input attachments mapped to a color, depth, or stencil attachment return the value for the original larger fragment containing the smaller fragment. Reads of input attachments not mapped to a color, depth, or stencil attachment use the new fragment area.

Because the content of any depth/stencil resolve attachment as well as any color resolve attachment is undefined at the beginning of a resolve operation, any depth testing, stencil testing, or blending operation which sources these undefined values also has undefined result value.

During a custom resolve pass, multiple fragment invocations writing to the same (x, y, layer, view, sample) coordinate, i.e. overdraw, will produce undefined behavior.

Implementations are allowed to implement custom resolve attachment writes through other mechanisms than framebuffer attachment writes, which would normally obey rules of rasterization order.

Valid Usage

  • The current render pass instance must have been started or resumed by cmdBeginRendering in this commandBuffer

Valid Usage (Implicit)

  • If pBeginCustomResolveInfo is not NULL, pBeginCustomResolveInfo must be a valid pointer to a valid BeginCustomResolveInfoEXT structure
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support QUEUE_GRAPHICS_BIT operations
  • This command must only be called inside of a render pass instance
  • This command must not be called between suspended render pass instances
  • This command must only be called outside of a video coding scope

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 ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryInside Outside VK_QUEUE_GRAPHICS_BIT Action

Conditional Rendering

vkCmdBeginCustomResolveEXT is affected by conditional rendering

See Also

VK_EXT_custom_resolve, VK_KHR_dynamic_rendering, VK_VERSION_1_3, BeginCustomResolveInfoEXT, CommandBuffer

data BeginCustomResolveInfoEXT Source #

VkBeginCustomResolveInfoEXT - Structure specifying shader resolve information

Valid Usage (Implicit)

See Also

VK_EXT_custom_resolve, VK_KHR_dynamic_rendering, VK_VERSION_1_3, StructureType, cmdBeginCustomResolveEXT

Instances

Instances details
Eq BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Storable BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Show BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

FromCStruct BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

ToCStruct BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Zero BeginCustomResolveInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

data PhysicalDeviceCustomResolveFeaturesEXT Source #

VkPhysicalDeviceCustomResolveFeaturesEXT - Structure indicating support for shader resolves

Members

This structure describes the following feature:

Description

If the PhysicalDeviceCustomResolveFeaturesEXT 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. If the application wishes to use a Device with any features described by PhysicalDeviceCustomResolveFeaturesEXT, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Valid Usage (Implicit)

See Also

VK_EXT_custom_resolve, Bool32, StructureType

Constructors

PhysicalDeviceCustomResolveFeaturesEXT 

Fields

  • customResolve :: Bool

    customResolve specifies that the implementation supports render pass resolves using shaders.

Instances

Instances details
Eq PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Storable PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Show PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

FromCStruct PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

ToCStruct PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

Zero PhysicalDeviceCustomResolveFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_custom_resolve

data CustomResolveCreateInfoEXT Source #

VkCustomResolveCreateInfoEXT - Structure specifying format info for custom resolves

Description

If the pNext chain includes this structure for one of:

it specifies the formats used in custom resolves within the same render pass. It also specifies that the corresponding object will be used in a render pass which contains a custom resolve operation.

If the pNext chain includes this structure for a ShaderCreateInfoEXT for a fragment shader object, it only specifies that the fragment shader will be used in a custom resolve operation.

If a graphics pipeline is created with a valid RenderPass, parameters of this structure are ignored.

If customResolve is FALSE, the pipeline can only be used outside the custom resolve section. If customResolve is TRUE, the pipeline can only be used inside the custom resolve section.

When a dynamic render pass instance contains a custom resolve operation and the dynamicRenderingUnusedAttachments feature is not enabled , all pipelines used to draw in such render pass must include this structure and have identical format information in it. When a dynamic render pass does not contain a custom resolve operation and the dynamicRenderingUnusedAttachments feature is not enabled , all pipelines used to draw in such render pass must not include this structure.

If the dynamicRenderingUnusedAttachments feature is enabled, then when this structure is not included in the pNext chain for GraphicsPipelineCreateInfo, customResolve is FALSE, colorAttachmentCount is 0, and depthAttachmentFormat and stencilAttachmentFormat are FORMAT_UNDEFINED.

If depthAttachmentFormat, stencilAttachmentFormat, or any element of pColorAttachmentFormats is FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the resolve portion of 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.

When passed as a pNext member to a ShaderCreateInfoEXT struct for use with fragment density maps, the colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, and stencilAttachmentFormat members of this struct are ignored. When not passed as a pNext member, customResolve is FALSE.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_custom_resolve, VK_KHR_dynamic_rendering, VK_VERSION_1_3, Bool32, Format, StructureType

Constructors

CustomResolveCreateInfoEXT 

Fields

  • customResolve :: Bool

    customResolve indicates whether this pipeline will be used for a resolve operation.

  • colorAttachmentFormats :: Vector Format

    pColorAttachmentFormats is a pointer to an array of Format values defining the format of color resolve attachments used in custom resolves in the same render pass.

  • depthAttachmentFormat :: Format

    depthAttachmentFormat is a Format value defining the format of the depth resolve attachment used in custom resolves in the same render pass.

  • stencilAttachmentFormat :: Format

    stencilAttachmentFormat is a Format value defining the format of the stencil resolve attachment used in custom resolves in the same render pass.

type EXT_CUSTOM_RESOLVE_EXTENSION_NAME = "VK_EXT_custom_resolve" Source #