Class NVShadingRateImage
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:
FragmentSizeNV
, which indicates the width and height of the set of pixels processed by the fragment shader.InvocationsPerPixel
, which indicates the maximum number of fragment shader invocations that could be spawned for the pixel(s) covered by 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
- Pat Brown nvpbrown
Other Extension Metadata
- Last Modified Date
- 2019-07-18
- Interactions and External Dependencies
- This extension requires
SPV_NV_shading_rate
- This extension provides API support for
GL_NV_shading_rate_image
- This extension requires
- 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 TypeFieldDescriptionstatic final int
ExtendsVkAccessFlagBits
.static final int
VkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final int
VkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final int
VkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final int
VkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final int
ExtendsVkDynamicState
.static final int
ExtendsVkDynamicState
.static final int
ExtendsVkImageLayout
.static final int
ExtendsVkImageUsageFlagBits
.static final String
The extension name.static final int
The extension specification version.static final int
ExtendsVkPipelineStageFlagBits
.static final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
VkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final int
ExtendsVkStructureType
.static final int
ExtendsVkStructureType
.static final int
ExtendsVkStructureType
.static final int
ExtendsVkStructureType
. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
nvkCmdSetCoarseSampleOrderNV
(VkCommandBuffer commandBuffer, int sampleOrderType, int customSampleOrderCount, long pCustomSampleOrders) Unsafe version of:CmdSetCoarseSampleOrderNV
static void
nvkCmdSetViewportShadingRatePaletteNV
(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pShadingRatePalettes) Unsafe version of:CmdSetViewportShadingRatePaletteNV
static void
vkCmdBindShadingRateImageNV
(VkCommandBuffer commandBuffer, long imageView, int imageLayout) Bind a shading rate image on a command buffer.static void
vkCmdSetCoarseSampleOrderNV
(VkCommandBuffer commandBuffer, int sampleOrderType, VkCoarseSampleOrderCustomNV.Buffer pCustomSampleOrders) Set order of coverage samples for coarse fragments dynamically for a command buffer.static void
vkCmdSetViewportShadingRatePaletteNV
(VkCommandBuffer commandBuffer, int firstViewport, VkShadingRatePaletteNV.Buffer pShadingRatePalettes) Set shading rate image palettes dynamically for a command buffer.
-
Field Details
-
VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION
public static final int VK_NV_SHADING_RATE_IMAGE_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV
public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NVExtendsVkStructureType
.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NVExtendsVkStructureType
.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NVExtendsVkStructureType
.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV
public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NVExtendsVkStructureType
.Enum values:
- See Also:
-
VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
public static final int VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NVExtendsVkImageLayout
.- See Also:
-
VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV
public static final int VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVExtendsVkDynamicState
.Enum values:
- See Also:
-
VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV
public static final int VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NVExtendsVkDynamicState
.Enum values:
- See Also:
-
VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV
public static final int VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NVExtendsVkAccessFlagBits
.- See Also:
-
VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
public static final int VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NVExtendsVkImageUsageFlagBits
.- See Also:
-
VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV
public static final int VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NVExtendsVkPipelineStageFlagBits
.- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV
public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NVVkShadingRatePaletteEntryNV - Shading rate image palette entry typesDescription
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.See Also
- See Also:
-
VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NVVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesDescription
COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
specifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
specifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrders
member ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
or thepCustomSampleOrders
member ofCmdSetCoarseSampleOrderNV
.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index.COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by sample index and then by pixel coordinate (in row-major order).
See Also
VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,CmdSetCoarseSampleOrderNV
- See Also:
-
VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesDescription
COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
specifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
specifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrders
member ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
or thepCustomSampleOrders
member ofCmdSetCoarseSampleOrderNV
.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index.COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by sample index and then by pixel coordinate (in row-major order).
See Also
VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,CmdSetCoarseSampleOrderNV
- See Also:
-
VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesDescription
COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
specifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
specifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrders
member ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
or thepCustomSampleOrders
member ofCmdSetCoarseSampleOrderNV
.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index.COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by sample index and then by pixel coordinate (in row-major order).
See Also
VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,CmdSetCoarseSampleOrderNV
- See Also:
-
VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV
public static final int VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NVVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesDescription
COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
specifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
specifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrders
member ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
or thepCustomSampleOrders
member ofCmdSetCoarseSampleOrderNV
.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index.COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV
specifies that coverage samples will be ordered sequentially, sorted first by sample index and then by pixel coordinate (in row-major order).
See Also
VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,CmdSetCoarseSampleOrderNV
- See Also:
-
-
Method Details
-
vkCmdBindShadingRateImageNV
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
- The
shadingRateImage
feature must be enabled - If
imageView
is notNULL_HANDLE
, it must be a validVkImageView
handle of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
imageView
is notNULL_HANDLE
, it must have a format ofFORMAT_R8_UINT
- If
imageView
is notNULL_HANDLE
, it must have been created with ausage
value includingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
- If
imageView
is notNULL_HANDLE
,imageLayout
must match the actualVkImageLayout
of each subresource accessible fromimageView
at the time the subresource is accessed - If
imageView
is notNULL_HANDLE
,imageLayout
must beIMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
orIMAGE_LAYOUT_GENERAL
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handle- If
imageView
is notNULL_HANDLE
,imageView
must be a validVkImageView
handle imageLayout
must be a validVkImageLayout
valuecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a video coding scope
- Both of
commandBuffer
, andimageView
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.imageView
- an image view handle specifying the shading rate image.imageView
may be set toNULL_HANDLE
, which is equivalent to specifying a view of an image filled with zero values.imageLayout
- the layout that the image subresources accessible fromimageView
will be in when the shading rate image is accessed.
- The
-
nvkCmdSetViewportShadingRatePaletteNV
public static void nvkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pShadingRatePalettes) Unsafe version of:CmdSetViewportShadingRatePaletteNV
- Parameters:
viewportCount
- the number of viewports whose shading rate palettes are updated by the command.
-
vkCmdSetViewportShadingRatePaletteNV
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 inVkPipelineDynamicStateCreateInfo
::pDynamicStates
. Otherwise, this state is specified by theVkPipelineViewportShadingRateImageStateCreateInfoNV
::pShadingRatePalettes
values used to create the currently active pipeline.Valid Usage
- The
shadingRateImage
feature must be enabled - The sum of
firstViewport
andviewportCount
must be between 1 andVkPhysicalDeviceLimits
::maxViewports
, inclusive - If the
multiViewport
feature is not enabled,firstViewport
must be 0 - If the
multiViewport
feature is not enabled,viewportCount
must be 1
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepShadingRatePalettes
must be a valid pointer to an array ofviewportCount
validVkShadingRatePaletteNV
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
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
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.firstViewport
- the index of the first viewport whose shading rate palette is updated by the command.pShadingRatePalettes
- a pointer to an array ofVkShadingRatePaletteNV
structures defining the palette for each viewport.
- The
-
nvkCmdSetCoarseSampleOrderNV
public static void nvkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, int sampleOrderType, int customSampleOrderCount, long pCustomSampleOrders) Unsafe version of:CmdSetCoarseSampleOrderNV
- Parameters:
customSampleOrderCount
- specifies the number of custom sample orderings to use when ordering coverage samples.
-
vkCmdSetCoarseSampleOrderNV
public static void vkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, int sampleOrderType, @Nullable 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
isCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated inpCustomSampleOrders
will be identical to that used forCOARSE_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 inVkPipelineDynamicStateCreateInfo
::pDynamicStates
. Otherwise, this state is specified by theVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
values used to create the currently active pipeline.Valid Usage
- If
sampleOrderType
is notCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
,customSamplerOrderCount
must be 0 - The array
pCustomSampleOrders
must not contain two structures with matching values for both theshadingRate
andsampleCount
members
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesampleOrderType
must be a validVkCoarseSampleOrderTypeNV
value- If
customSampleOrderCount
is not 0,pCustomSampleOrders
must be a valid pointer to an array ofcustomSampleOrderCount
validVkCoarseSampleOrderCustomNV
structures commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
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
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Both Outside Graphics State See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.sampleOrderType
- specifies the mechanism used to order coverage samples in fragments larger than one pixel.pCustomSampleOrders
- a pointer to an array ofVkCoarseSampleOrderCustomNV
structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.
- If
-