vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Description

Name

VK_EXT_multisampled_render_to_single_sampled - device extension

VK_EXT_multisampled_render_to_single_sampled

Name String
VK_EXT_multisampled_render_to_single_sampled
Extension Type
Device extension
Registered Extension Number
377
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
VK_KHR_create_renderpass2 and VK_KHR_depth_stencil_resolve
Contact
Extension Proposal
VK_EXT_multisampled_render_to_single_sampled

Other Extension Metadata

Last Modified Date
2021-04-16
IP Status
No known IP claims.
Contributors
  • Shahbaz Youssefi, Google
  • Jan-Harald Fredriksen, Arm
  • Jörg Wagner, Arm
  • Matthew Netsch, Qualcomm Technologies, Inc.
  • Jarred Davies, Imagination Technologies

Description

With careful usage of resolve attachments, multisampled image memory allocated with MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT, loadOp not equal to ATTACHMENT_LOAD_OP_LOAD and storeOp not equal to ATTACHMENT_STORE_OP_STORE, a Vulkan application is able to efficiently perform multisampled rendering without incurring any additional memory penalty on some implementations.

Under certain circumstances however, the application may not be able to complete its multisampled rendering within a single render pass; for example if it does partial rasterization from frame to frame, blending on an image from a previous frame, or in emulation of GL_EXT_multisampled_render_to_texture. In such cases, the application can use an initial subpass to effectively load single-sampled data from the next subpass’s resolve attachment and fill in the multisampled attachment which otherwise uses loadOp equal to ATTACHMENT_LOAD_OP_DONT_CARE. However, this is not always possible (for example for stencil in the absence of VK_EXT_shader_stencil_export) and has multiple drawbacks.

Some implementations are able to perform said operation efficiently in hardware, effectively loading a multisampled attachment from the contents of a single sampled one. Together with the ability to perform a resolve operation at the end of a subpass, these implementations are able to perform multisampled rendering on single-sampled attachments with no extra memory or bandwidth overhead. This extension exposes this capability by allowing a framebuffer and render pass to include single-sampled attachments while rendering is done with a specified number of samples.

New Structures

New Enum Constants

Issues

1) Could the multisampled attachment be initialized through some form of copy?

RESOLVED: No. Some implementations do not support copying between attachments in general, and find expressing this operation through a copy unnatural.

2) Another way to achieve this is by introducing a new loadOp to load the contents of the multisampled image from a single-sampled one. Why is this extension preferred?

RESOLVED: Using this extension simplifies the application, as it does not need to manage a secondary lazily-allocated image. Additionally, using this extension leaves less room for error; for example a single mistake in loadOp or storeOp would result in the lazily-allocated image to actually take up memory, and remain so until destruction.

3) There is no guarantee that multisampled data between two subpasses with the same number of samples will be retained as the implementation may be forced to split the render pass implicitly for various reasons. Should this extension require that every subpass that uses multisampled-render-to-single-sampled end in an implicit render pass split (which results in a resolve operation)?

RESOLVED: No. Not requiring this allows render passes with multiple multisampled-render-to-single-sampled subpasses to potentially execute more efficiently (though there is no guarantee).

Version History

  • Revision 1, 2021-04-12 (Shahbaz Youssefi)

See Also

MultisampledRenderToSingleSampledInfoEXT, PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT, SubpassResolvePerformanceQueryEXT

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

data PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source #

VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT - Structure describing whether multisampled rendering to single-sampled attachments is supported

Members

This structure describes the following features:

Description

If the PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT 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. PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_EXT_multisampled_render_to_single_sampled, Bool32, StructureType

Constructors

PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT 

Fields

Instances

Instances details
Storable PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Show PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Eq PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

FromCStruct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

ToCStruct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Zero PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

data SubpassResolvePerformanceQueryEXT Source #

VkSubpassResolvePerformanceQueryEXT - Structure specifying the efficiency of subpass resolve for an attachment with a format

Description

If optimal is FALSE for a Format, using a subpass resolve operation on a multisampled attachment with this format can incur additional costs, including additional memory bandwidth usage and a higher memory footprint. If an attachment with such a format is used in a multisampled-render-to-single-sampled subpass, the additional memory and memory bandwidth usage can nullify the benefits of using the VK_EXT_multisampled_render_to_single_sampled extension.

Valid Usage (Implicit)

See Also

VK_EXT_multisampled_render_to_single_sampled, Bool32, StructureType

Constructors

SubpassResolvePerformanceQueryEXT 

Fields

  • optimal :: Bool

    optimal specifies that a subpass resolve operation is optimally performed.

Instances

Instances details
Storable SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Show SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Eq SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

FromCStruct SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

ToCStruct SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Zero SubpassResolvePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

data MultisampledRenderToSingleSampledInfoEXT Source #

VkMultisampledRenderToSingleSampledInfoEXT - Structure containing info for multisampled rendering to single-sampled attachments in a subpass

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_multisampled_render_to_single_sampled, Bool32, SampleCountFlagBits, StructureType

Constructors

MultisampledRenderToSingleSampledInfoEXT 

Fields

Instances

Instances details
Storable MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Show MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Eq MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

FromCStruct MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

ToCStruct MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

Zero MultisampledRenderToSingleSampledInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled

type EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled" Source #