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

Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Description

Name

VK_NV_fragment_shading_rate_enums - device extension

VK_NV_fragment_shading_rate_enums

Name String
VK_NV_fragment_shading_rate_enums
Extension Type
Device extension
Registered Extension Number
327
Revision
1
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_KHR_fragment_shading_rate
Contact

Other Extension Metadata

Last Modified Date
2020-09-02
Contributors
  • Pat Brown, NVIDIA
  • Jeff Bolz, NVIDIA

Description

This extension builds on the fragment shading rate functionality provided by the VK_KHR_fragment_shading_rate extension, adding support for "supersample" fragment shading rates that trigger multiple fragment shader invocations per pixel as well as a "no invocations" shading rate that discards any portions of a primitive that would use that shading rate.

New Commands

New Structures

New Enums

New Enum Constants

Issues

  1. Why was this extension created? How should it be named?

    RESOLVED: The primary goal of this extension was to expose support for supersample and "no invocations" shading rates, which are supported by the VK_NV_shading_rate_image extension but not by VK_KHR_fragment_shading_rate. Because VK_KHR_fragment_shading_rate specifies the primitive shading rate using a fragment size in pixels, it lacks a good way to specify supersample rates. To deal with this, we defined enums covering shading rates supported by the KHR extension as well as the new shading rates and added structures and APIs accepting shading rate enums instead of fragment sizes.

    Since this extension adds two different types of shading rates, both expressed using enums, we chose the extension name VK_NV_fragment_shading_rate_enums.

  1. Is this a standalone extension?

    RESOLVED: No, this extension requires VK_KHR_fragment_shading_rate. In order to use the features of this extension, applications must enable the relevant features of KHR extension.

  2. How are the shading rate enums used, and how were the enum values assigned?

    RESOLVED: The shading rates supported by the enums in this extension are accepted as pipeline, primitive, and attachment shading rates and behave identically. For the shading rates also supported by the KHR extension, the values assigned to the corresponding enums are identical to the values already used for the primitive and attachment shading rates in the KHR extension. For those enums, bits 0 and 1 specify the base two logarithm of the fragment height and bits 2 and 3 specify the base two logarithm of the fragment width. For the new shading rates added by this extension, we chose to use 11 through 14 (10 plus the base two logarithm of the invocation count) for the supersample rates and 15 for the "no invocations" rate. None of those values are supported as primitive or attachment shading rates by the KHR extension.

  3. Between this extension, VK_KHR_fragment_shading_rate, and VK_NV_shading_rate_image, there are three different ways to specify shading rate state in a pipeline. How should we handle this?

    RESOLVED: We don’t allow the concurrent use of VK_NV_shading_rate_image and VK_KHR_fragment_shading_rate; it is an error to enable shading rate features from both extensions. But we do allow applications to enable this extension together with VK_KHR_fragment_shading_rate together. While we expect that applications will never attach pipeline CreateInfo structures for both this extension and the KHR extension concurrently, Vulkan doesn’t have any precedent forbidding such behavior and instead typically treats a pipeline created without an extension-specific CreateInfo structure as equivalent to one containing default values specified by the extension. Rather than adding such a rule considering the presence or absence of our new CreateInfo structure, we instead included a shadingRateType member to PipelineFragmentShadingRateEnumStateCreateInfoNV that selects between using state specified by that structure and state specified by PipelineFragmentShadingRateStateCreateInfoKHR.

Version History

  • Revision 1, 2020-09-02 (pbrown)

    • Internal revisions

See Also

FragmentShadingRateNV, FragmentShadingRateTypeNV, PhysicalDeviceFragmentShadingRateEnumsFeaturesNV, PhysicalDeviceFragmentShadingRateEnumsPropertiesNV, PipelineFragmentShadingRateEnumStateCreateInfoNV, cmdSetFragmentShadingRateEnumNV

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

cmdSetFragmentShadingRateEnumNV Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> FragmentShadingRateNV

shadingRate specifies a FragmentShadingRateNV enum indicating the pipeline fragment shading rate for subsequent draw commands.

-> ("combinerOps" ::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR))

combinerOps specifies a FragmentShadingRateCombinerOpKHR determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by subsequent drawing commands.

-> io () 

vkCmdSetFragmentShadingRateEnumNV - Set pipeline fragment shading rate dynamically using enums

Valid Usage

Valid Usage (Implicit)

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 Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Both Graphics

See Also

CommandBuffer, FragmentShadingRateCombinerOpKHR, FragmentShadingRateNV

data PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source #

VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV - Structure indicating support for fragment shading rate enums

Members

The members of the PhysicalDeviceFragmentShadingRateEnumsFeaturesNV structure describe the following features:

Description

If the PhysicalDeviceFragmentShadingRateEnumsFeaturesNV structure is included in the pNext chain of PhysicalDeviceFeatures2, it is filled with values indicating whether each feature is supported. PhysicalDeviceFragmentShadingRateEnumsFeaturesNV can also be used in the pNext chain of DeviceCreateInfo to enable these features.

Valid Usage (Implicit)

See Also

Bool32, StructureType

Constructors

PhysicalDeviceFragmentShadingRateEnumsFeaturesNV 

Fields

  • fragmentShadingRateEnums :: Bool

    fragmentShadingRateEnums indicates that the implementation supports specifying fragment shading rates using the FragmentShadingRateNV enumerated type.

  • supersampleFragmentShadingRates :: Bool

    supersampleFragmentShadingRates indicates that the implementation supports fragment shading rate enum values indicating more than one invocation per fragment.

  • noInvocationFragmentShadingRates :: Bool

    noInvocationFragmentShadingRates indicates that the implementation supports a fragment shading rate enum value indicating that no fragment shaders should be invoked when that shading rate is used.

Instances

Instances details
Eq PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Show PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Storable PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

FromCStruct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

ToCStruct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Zero PhysicalDeviceFragmentShadingRateEnumsFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

data PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source #

VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV - Structure describing fragment shading rate limits that can be supported by an implementation

Members

The members of the PhysicalDeviceFragmentShadingRateEnumsPropertiesNV structure describe the following implementation-dependent properties related to fragment shading rates:

Description

If the PhysicalDeviceFragmentShadingRateEnumsPropertiesNV structure is included in the pNext chain of PhysicalDeviceProperties2, it is filled with the implementation-dependent limits.

Valid Usage (Implicit)

See Also

SampleCountFlagBits, StructureType

Constructors

PhysicalDeviceFragmentShadingRateEnumsPropertiesNV 

Fields

Instances

Instances details
Eq PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Show PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Storable PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

FromCStruct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

ToCStruct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Zero PhysicalDeviceFragmentShadingRateEnumsPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

data PipelineFragmentShadingRateEnumStateCreateInfoNV Source #

VkPipelineFragmentShadingRateEnumStateCreateInfoNV - Structure specifying parameters controlling the fragment shading rate using rate enums

Description

If the pNext chain of GraphicsPipelineCreateInfo includes a PipelineFragmentShadingRateEnumStateCreateInfoNV structure, then that structure includes parameters that control the pipeline fragment shading rate.

If this structure is not present, shadingRateType is considered to be equal to FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV, shadingRate is considered to be equal to FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV, and both elements of combinerOps are considered to be equal to FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR.

Valid Usage (Implicit)

See Also

FragmentShadingRateCombinerOpKHR, FragmentShadingRateNV, FragmentShadingRateTypeNV, StructureType

Constructors

PipelineFragmentShadingRateEnumStateCreateInfoNV 

Fields

Instances

Instances details
Eq PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Show PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Storable PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

FromCStruct PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

ToCStruct PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Zero PipelineFragmentShadingRateEnumStateCreateInfoNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

newtype FragmentShadingRateNV Source #

VkFragmentShadingRateNV - Enumeration with fragment shading rates

Description

To use the shading rates FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, and FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV as a pipeline, primitive, or attachment shading rate, the supersampleFragmentShadingRates feature must be enabled. To use the shading rate FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV as a pipeline, primitive, or attachment shading rate, the noInvocationFragmentShadingRates feature must be enabled.

See Also

PipelineFragmentShadingRateEnumStateCreateInfoNV, cmdSetFragmentShadingRateEnumNV

Bundled Patterns

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV specifies a fragment size of 1x1 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV specifies a fragment size of 1x2 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV specifies a fragment size of 2x1 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV specifies a fragment size of 2x2 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV specifies a fragment size of 2x4 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV specifies a fragment size of 4x2 pixels.

pattern FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV specifies a fragment size of 4x4 pixels.

pattern FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with two fragment shader invocations per fragment.

pattern FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with four fragment shader invocations per fragment.

pattern FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with eight fragment shader invocations per fragment.

pattern FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV specifies a fragment size of 1x1 pixels, with sixteen fragment shader invocations per fragment.

pattern FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV :: FragmentShadingRateNV

FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV specifies that any portions of a primitive that use that shading rate should be discarded without invoking any fragment shader.

Instances

Instances details
Eq FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Ord FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Read FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Show FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Storable FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Zero FragmentShadingRateNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

newtype FragmentShadingRateTypeNV Source #

VkFragmentShadingRateTypeNV - Enumeration with fragment shading rate types

See Also

PipelineFragmentShadingRateEnumStateCreateInfoNV

Bundled Patterns

pattern FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV :: FragmentShadingRateTypeNV

FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the PipelineFragmentShadingRateStateCreateInfoKHR structure and that any state specified by the PipelineFragmentShadingRateEnumStateCreateInfoNV structure should be ignored.

pattern FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV :: FragmentShadingRateTypeNV

FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the PipelineFragmentShadingRateEnumStateCreateInfoNV structure and that any state specified by the PipelineFragmentShadingRateStateCreateInfoKHR structure should be ignored.

Instances

Instances details
Eq FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Ord FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Read FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Show FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Storable FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

Zero FragmentShadingRateTypeNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_fragment_shading_rate_enums

type NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums" Source #

newtype FragmentShadingRateCombinerOpKHR Source #

VkFragmentShadingRateCombinerOpKHR - Control how fragment shading rates are combined

Description

where combine(Axy,Bxy) is the combine operation, and Axy and Bxy are the inputs to the operation.

If fragmentShadingRateStrictMultiplyCombiner is FALSE, using FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR with values of 1 for both A and B in the same dimension results in the value 2 being produced for that dimension. See the definition of fragmentShadingRateStrictMultiplyCombiner for more information.

These operations are performed in a component-wise fashion.

See Also

PipelineFragmentShadingRateEnumStateCreateInfoNV, PipelineFragmentShadingRateStateCreateInfoKHR, cmdSetFragmentShadingRateEnumNV, cmdSetFragmentShadingRateKHR

Instances

Instances details
Eq FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate

Ord FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate

Read FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate

Show FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate

Storable FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate

Zero FragmentShadingRateCombinerOpKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_fragment_shading_rate