vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Description

Name

VK_NV_framebuffer_mixed_samples - device extension

VK_NV_framebuffer_mixed_samples

Name String
VK_NV_framebuffer_mixed_samples
Extension Type
Device extension
Registered Extension Number
153
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
None
API Interactions
  • Interacts with VK_VERSION_1_3
  • Interacts with VK_KHR_dynamic_rendering
Contact

Other Extension Metadata

Last Modified Date
2017-06-04
Contributors
  • Jeff Bolz, NVIDIA

Description

This extension allows multisample rendering with a raster and depth/stencil sample count that is larger than the color sample count. Rasterization and the results of the depth and stencil tests together determine the portion of a pixel that is “covered”. It can be useful to evaluate coverage at a higher frequency than color samples are stored. This coverage is then “reduced” to a collection of covered color samples, each having an opacity value corresponding to the fraction of the color sample covered. The opacity can optionally be blended into individual color samples.

Rendering with fewer color samples than depth/stencil samples greatly reduces the amount of memory and bandwidth consumed by the color buffer. However, converting the coverage values into opacity introduces artifacts where triangles share edges and may not be suitable for normal triangle mesh rendering.

One expected use case for this functionality is Stencil-then-Cover path rendering (similar to the OpenGL GL_NV_path_rendering extension). The stencil step determines the coverage (in the stencil buffer) for an entire path at the higher sample frequency, and then the cover step draws the path into the lower frequency color buffer using the coverage information to antialias path edges. With this two-step process, internal edges are fully covered when antialiasing is applied and there is no corruption on these edges.

The key features of this extension are:

  • It allows render pass and framebuffer objects to be created where the number of samples in the depth/stencil attachment in a subpass is a multiple of the number of samples in the color attachments in the subpass.
  • A coverage reduction step is added to Fragment Operations which converts a set of covered raster/depth/stencil samples to a set of color samples that perform blending and color writes. The coverage reduction step also includes an optional coverage modulation step, multiplying color values by a fractional opacity corresponding to the number of associated raster/depth/stencil samples covered.

New Structures

If Vulkan Version 1.3 or VK_KHR_dynamic_rendering is supported:

New Enums

New Bitmasks

New Enum Constants

If Vulkan Version 1.3 or VK_KHR_dynamic_rendering is supported:

Version History

  • Revision 1, 2017-06-04 (Jeff Bolz)

    • 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.

Synopsis

Documentation

data PipelineCoverageModulationStateCreateInfoNV Source #

VkPipelineCoverageModulationStateCreateInfoNV - Structure specifying parameters controlling coverage modulation

Description

If coverageModulationTableEnable is FALSE, then for each color sample the associated bits of the pixel coverage are counted and divided by the number of associated bits to produce a modulation factor R in the range (0,1] (a value of zero would have been killed due to a color coverage of 0). Specifically:

  • N = value of rasterizationSamples
  • M = value of AttachmentDescription::samples for any color attachments
  • R = popcount(associated coverage bits) / (N / M)

If coverageModulationTableEnable is TRUE, the value R is computed using a programmable lookup table. The lookup table has N / M elements, and the element of the table is selected by:

  • R = pCoverageModulationTable[popcount(associated coverage bits)-1]

Note that the table does not have an entry for popcount(associated coverage bits) = 0, because such samples would have been killed.

The values of pCoverageModulationTable may be rounded to an implementation-dependent precision, which is at least as fine as 1 / N, and clamped to [0,1].

For each color attachment with a floating-point or normalized color format, each fragment output color value is replicated to M values which can each be modulated (multiplied) by that color sample’s associated value of R. Which components are modulated is controlled by coverageModulationMode.

If this structure is not included in the pNext chain, it is as if coverageModulationMode is COVERAGE_MODULATION_MODE_NONE_NV.

If the coverage reduction mode is COVERAGE_REDUCTION_MODE_TRUNCATE_NV, each color sample is associated with only a single coverage sample. In this case, it is as if coverageModulationMode is COVERAGE_MODULATION_MODE_NONE_NV.

Valid Usage

  • If coverageModulationTableEnable is TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpass

Valid Usage (Implicit)

See Also

VK_NV_framebuffer_mixed_samples, Bool32, CoverageModulationModeNV, PipelineCoverageModulationStateCreateFlagsNV, StructureType

Constructors

PipelineCoverageModulationStateCreateInfoNV 

Fields

Instances

Instances details
Show PipelineCoverageModulationStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

FromCStruct PipelineCoverageModulationStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

ToCStruct PipelineCoverageModulationStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Zero PipelineCoverageModulationStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

newtype PipelineCoverageModulationStateCreateFlagsNV Source #

VkPipelineCoverageModulationStateCreateFlagsNV - Reserved for future use

Description

PipelineCoverageModulationStateCreateFlagsNV is a bitmask type for setting a mask, but is currently reserved for future use.

See Also

VK_NV_framebuffer_mixed_samples, Flags, PipelineCoverageModulationStateCreateInfoNV

Instances

Instances details
Bits PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Methods

(.&.) :: PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV #

(.|.) :: PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV #

xor :: PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV #

complement :: PipelineCoverageModulationStateCreateFlagsNV -> PipelineCoverageModulationStateCreateFlagsNV #

shift :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

rotate :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

zeroBits :: PipelineCoverageModulationStateCreateFlagsNV #

bit :: Int -> PipelineCoverageModulationStateCreateFlagsNV #

setBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

clearBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

complementBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

testBit :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> Bool #

bitSizeMaybe :: PipelineCoverageModulationStateCreateFlagsNV -> Maybe Int #

bitSize :: PipelineCoverageModulationStateCreateFlagsNV -> Int #

isSigned :: PipelineCoverageModulationStateCreateFlagsNV -> Bool #

shiftL :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

unsafeShiftL :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

shiftR :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

unsafeShiftR :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

rotateL :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

rotateR :: PipelineCoverageModulationStateCreateFlagsNV -> Int -> PipelineCoverageModulationStateCreateFlagsNV #

popCount :: PipelineCoverageModulationStateCreateFlagsNV -> Int #

FiniteBits PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Eq PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Ord PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Storable PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Read PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Show PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Zero PipelineCoverageModulationStateCreateFlagsNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

newtype CoverageModulationModeNV Source #

VkCoverageModulationModeNV - Specify the coverage modulation mode

Description

See Also

VK_NV_framebuffer_mixed_samples, PipelineCoverageModulationStateCreateInfoNV, cmdSetCoverageModulationModeNV

Instances

Instances details
Eq CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Ord CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Storable CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Read CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Show CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

Zero CoverageModulationModeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_framebuffer_mixed_samples

type NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples" Source #

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 CommandBufferInheritanceRenderingInfo::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 included 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)

See Also

VK_AMD_mixed_attachment_samples, VK_KHR_dynamic_rendering, VK_NV_framebuffer_mixed_samples, VK_VERSION_1_3, SampleCountFlagBits, StructureType

Constructors

AttachmentSampleCountInfoAMD 

Fields