Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class NVShadingRateImage

extends Object
Class Inheritance
Imports
javax.annotation.*, org.lwjgl.system.*

This extension allows applications to use a variable shading rate when processing fragments of rasterized primitives. By default, Vulkan will spawn one fragment shader for each pixel covered by a primitive. In this extension, applications can bind a shading rate image that can be used to vary the number of fragment shader invocations across the framebuffer. Some portions of the screen may be configured to spawn up to 16 fragment shaders for each pixel, while other portions may use a single fragment shader invocation for a 4x4 block of pixels. This can be useful for use cases like eye tracking, where the portion of the framebuffer that the user is looking at directly can be processed at high frequency, while distant corners of the image can be processed at lower frequency. Each texel in the shading rate image represents a fixed-size rectangle in the framebuffer, covering 16x16 pixels in the initial implementation of this extension. When rasterizing a primitive covering one of these rectangles, the Vulkan implementation reads a texel in the bound shading rate image and looks up the fetched value in a palette to determine a base shading rate.

In addition to the API support controlling rasterization, this extension also adds Vulkan support for the SPV_NV_shading_rate extension to SPIR-V. That extension provides two fragment shader variable decorations that allow fragment shaders to determine the shading rate used for processing the fragment:

When using SPIR-V in conjunction with the OpenGL Shading Language (GLSL), the fragment shader capabilities are provided by the GL_NV_shading_rate_image language extension and correspond to the built-in variables gl_FragmentSizeNV and gl_InvocationsPerPixelNV, respectively.

VK_NV_shading_rate_image
Name String
VK_NV_shading_rate_image
Extension Type
Device extension
Registered Extension Number
165
Revision
3
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2
Contact
Other Extension Metadata
Last Modified Date
2019-07-18
Interactions and External Dependencies
Contributors
  • Pat Brown, NVIDIA
  • Carsten Rohde, NVIDIA
  • Jeff Bolz, NVIDIA
  • Daniel Koch, NVIDIA
  • Mathias Schott, NVIDIA
  • Matthew Netsch, Qualcomm Technologies, Inc.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types Description

public static final int
VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types Description

public static final int
VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types Description

public static final int
VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types Description

public static final int
public static final int
public static final int
public static final int
VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV

Extends VkImageUsageFlagBits.

public static final String
public static final int
VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION

The extension specification version.

public static final int
VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV

Extends VkPipelineStageFlagBits.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment.

public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, int sampleOrderType, int
specifies the number of custom sample orderings to use when ordering coverage samples.
customSampleOrderCount
,
long pCustomSampleOrders)

Unsafe version of: CmdSetCoarseSampleOrderNV

public static void
nvkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, int firstViewport, int
the number of viewports whose shading rate palettes are updated by the command.
viewportCount
,
long pShadingRatePalettes)

Unsafe version of: CmdSetViewportShadingRatePaletteNV

public static void
vkCmdBindShadingRateImageNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
long
an image view handle specifying the shading rate image. imageView may be set to NULL_HANDLE, which is equivalent to specifying a view of an image filled with zero values.
imageView
,
int
the layout that the image subresources accessible from imageView will be in when the shading rate image is accessed.
imageLayout
)

Bind a shading rate image on a command buffer.

public static void
vkCmdSetCoarseSampleOrderNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
specifies the mechanism used to order coverage samples in fragments larger than one pixel.
sampleOrderType
,
VkCoarseSampleOrderCustomNV.Buffer
a pointer to an array of VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.
pCustomSampleOrders
)

Set order of coverage samples for coarse fragments dynamically for a command buffer.

public static void
vkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
int
the index of the first viewport whose shading rate palette is updated by the command.
firstViewport
,
VkShadingRatePaletteNV.Buffer
a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport.
pShadingRatePalettes
)

Set shading rate image palettes dynamically for a command buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NVback to summary
public static final int VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV

Extends VkAccessFlagBits.

VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVback to summary
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types

Description
See Also

VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, CmdSetCoarseSampleOrderNV

VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NVback to summary
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types

Description
See Also

VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, CmdSetCoarseSampleOrderNV

VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVback to summary
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types

Description
See Also

VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, CmdSetCoarseSampleOrderNV

VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NVback to summary
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV

VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types

Description
See Also

VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, CmdSetCoarseSampleOrderNV

VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NVback to summary
public static final int VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV

Extends VkDynamicState.

Enum values:
VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVback to summary
public static final int VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV

Extends VkDynamicState.

Enum values:
VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NVback to summary
public static final int VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV

Extends VkImageLayout.

VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NVback to summary
public static final int VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV

Extends VkImageUsageFlagBits.

VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAMEback to summary
public static final String VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME

The extension name.

VK_NV_SHADING_RATE_IMAGE_SPEC_VERSIONback to summary
public static final int VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION

The extension specification version.

VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NVback to summary
public static final int VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV

Extends VkPipelineStageFlagBits.

VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NVback to summary
public static final int VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV

VkShadingRatePaletteEntryNV - Shading rate image palette entry types

Description

The following table indicates the width and height (in pixels) of each fragment generated using the indicated shading rate, as well as the maximum number of fragment shader invocations launched for each fragment. When processing regions of a primitive that have a shading rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, no fragments will be generated in that region.

Shading RateWidthHeightInvocations
SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV000
SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV1116
SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV118
SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV114
SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV112
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV111
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV211
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV121
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV221
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV421
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV241
SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV441
See Also

VkCoarseSampleOrderCustomNV, VkShadingRatePaletteNV

VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NVback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NVback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NVback to summary
public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NVback to summary
public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV

Extends VkStructureType.

Enum values:

Constructor Detail

NVShadingRateImageback to summary
protected NVShadingRateImage()

Method Detail

nvkCmdSetCoarseSampleOrderNVback to summary
public static void nvkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, int sampleOrderType, int customSampleOrderCount, long pCustomSampleOrders)

Unsafe version of: CmdSetCoarseSampleOrderNV

Parameters
customSampleOrderCount:int

specifies the number of custom sample orderings to use when ordering coverage samples.

nvkCmdSetViewportShadingRatePaletteNVback to summary
public static void nvkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pShadingRatePalettes)

Unsafe version of: CmdSetViewportShadingRatePaletteNV

Parameters
viewportCount:int

the number of viewports whose shading rate palettes are updated by the command.

vkCmdBindShadingRateImageNVback to summary
public static void vkCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, long imageView, int imageLayout)

Bind a shading rate image on a command buffer.

C Specification

When shading rate image usage is enabled in the bound pipeline, the pipeline uses a shading rate image specified by the command:


void vkCmdBindShadingRateImageNV(
    VkCommandBuffer                             commandBuffer,
    VkImageView                                 imageView,
    VkImageLayout                               imageLayout);
Valid Usage
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • If imageView is not NULL_HANDLE, imageView must be a valid VkImageView handle
  • imageLayout must be a valid VkImageLayout value
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope
  • Both of commandBuffer, and imageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

imageView:long

an image view handle specifying the shading rate image. imageView may be set to NULL_HANDLE, which is equivalent to specifying a view of an image filled with zero values.

imageLayout:int

the layout that the image subresources accessible from imageView will be in when the shading rate image is accessed.

vkCmdSetCoarseSampleOrderNVback to summary
public static void vkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, int sampleOrderType, VkCoarseSampleOrderCustomNV.Buffer pCustomSampleOrders)

Set order of coverage samples for coarse fragments dynamically for a command buffer.

C Specification

To dynamically set the order of coverage samples in fragments larger than one pixel, call:


void vkCmdSetCoarseSampleOrderNV(
    VkCommandBuffer                             commandBuffer,
    VkCoarseSampleOrderTypeNV                   sampleOrderType,
    uint32_t                                    customSampleOrderCount,
    const VkCoarseSampleOrderCustomNV*          pCustomSampleOrders);
Description

If sampleOrderType is COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated in pCustomSampleOrders will be identical to that used for COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV.

This command sets the order of coverage samples for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineViewportCoarseSampleOrderStateCreateInfoNV values used to create the currently active pipeline.

Valid Usage
  • If sampleOrderType is not COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, customSamplerOrderCount must be 0
  • The array pCustomSampleOrders must not contain two structures with matching values for both the shadingRate and sampleCount members
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • sampleOrderType must be a valid VkCoarseSampleOrderTypeNV value
  • If customSampleOrderCount is not 0, pCustomSampleOrders must be a valid pointer to an array of customSampleOrderCount valid VkCoarseSampleOrderCustomNV structures
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • 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 VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
See Also

VkCoarseSampleOrderCustomNV

Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

sampleOrderType:int

specifies the mechanism used to order coverage samples in fragments larger than one pixel.

pCustomSampleOrders:VkCoarseSampleOrderCustomNV.Buffer

a pointer to an array of VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.

vkCmdSetViewportShadingRatePaletteNVback to summary
public static void vkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, int firstViewport, VkShadingRatePaletteNV.Buffer pShadingRatePalettes)

Set shading rate image palettes dynamically for a command buffer.

C Specification

To dynamically set the per-viewport shading rate image palettes, call:


void vkCmdSetViewportShadingRatePaletteNV(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    firstViewport,
    uint32_t                                    viewportCount,
    const VkShadingRatePaletteNV*               pShadingRatePalettes);
Description

This command sets the per-viewport shading rate image palettes for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineViewportShadingRateImageStateCreateInfoNV::pShadingRatePalettes values used to create the currently active pipeline.

Valid Usage
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • pShadingRatePalettes must be a valid pointer to an array of viewportCount valid VkShadingRatePaletteNV structures
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope
  • viewportCount must be greater than 0
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
See Also

VkShadingRatePaletteNV

Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

firstViewport:int

the index of the first viewport whose shading rate palette is updated by the command.

pShadingRatePalettes:VkShadingRatePaletteNV.Buffer

a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport.