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.
- 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_properties2or Version 1.1- SPIR-V Dependencies
- Contact
- Pat Brown nvpbrown
Other Extension Metadata
- Last Modified Date
- 2019-07-18
- Interactions and External Dependencies
- This extension provides API support for
GL_NV_shading_rate_image
- This extension provides API support for
- Contributors
- Pat Brown, NVIDIA
- Carsten Rohde, NVIDIA
- Jeff Bolz, NVIDIA
- Daniel Koch, NVIDIA
- Mathias Schott, NVIDIA
- Matthew Netsch, Qualcomm Technologies, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsVkAccessFlagBits.static final intVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final intVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final intVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final intVkCoarseSampleOrderTypeNV - Shading rate image sample ordering typesstatic final intExtendsVkDynamicState.static final intExtendsVkDynamicState.static final intExtendsVkImageLayout.static final intExtendsVkImageUsageFlagBits.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkPipelineStageFlagBits.static final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intVkShadingRatePaletteEntryNV - Shading rate image palette entry typesstatic final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdSetCoarseSampleOrderNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int sampleOrderType, int customSampleOrderCount, long pCustomSampleOrders) Unsafe version of:CmdSetCoarseSampleOrderNVstatic voidnvkCmdSetViewportShadingRatePaletteNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pShadingRatePalettes) Unsafe version of:CmdSetViewportShadingRatePaletteNVstatic voidvkCmdBindShadingRateImageNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long imageView, int imageLayout) Bind a shading rate image on a command buffer.static voidvkCmdSetCoarseSampleOrderNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int sampleOrderType, @Nullable VkCoarseSampleOrderCustomNV.Buffer pCustomSampleOrders) Set order of coverage samples for coarse fragments dynamically for a command buffer.static voidvkCmdSetViewportShadingRatePaletteNV(org.lwjgl.vulkan.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_NVspecifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVspecifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrdersmember ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNVor thepCustomSampleOrdersmember ofCmdSetCoarseSampleOrderNV.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVspecifies 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_NVspecifies 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_NVspecifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVspecifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrdersmember ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNVor thepCustomSampleOrdersmember ofCmdSetCoarseSampleOrderNV.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVspecifies 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_NVspecifies 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_NVspecifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVspecifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrdersmember ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNVor thepCustomSampleOrdersmember ofCmdSetCoarseSampleOrderNV.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVspecifies 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_NVspecifies 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_NVspecifies that coverage samples will be ordered in an implementation-dependent manner.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NVspecifies that coverage samples will be ordered according to the array of custom orderings provided in either thepCustomSampleOrdersmember ofVkPipelineViewportCoarseSampleOrderStateCreateInfoNVor thepCustomSampleOrdersmember ofCmdSetCoarseSampleOrderNV.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NVspecifies 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_NVspecifies 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(org.lwjgl.vulkan.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
shadingRateImagefeature must be enabled - If
imageViewis notNULL_HANDLE, it must be a validVkImageViewhandle of typeIMAGE_VIEW_TYPE_2DorIMAGE_VIEW_TYPE_2D_ARRAY - If
imageViewis notNULL_HANDLE, it must have a format ofFORMAT_R8_UINT - If
imageViewis notNULL_HANDLE, it must have been created with ausagevalue includingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV - If
imageViewis notNULL_HANDLE,imageLayoutmust match the actualVkImageLayoutof each subresource accessible fromimageViewat the time the subresource is accessed - If
imageViewis notNULL_HANDLE,imageLayoutmust beIMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NVorIMAGE_LAYOUT_GENERAL
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle- If
imageViewis notNULL_HANDLE,imageViewmust be a validVkImageViewhandle imageLayoutmust be a validVkImageLayoutvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
- Both of
commandBuffer, andimageViewthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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.imageViewmay beNULL_HANDLE, which is equivalent to specifying a view of an image filled with zero values.imageLayout- the layout that the image subresources accessible fromimageViewwill be in when the shading rate image is accessed.
- The
-
nvkCmdSetViewportShadingRatePaletteNV
public static void nvkCmdSetViewportShadingRatePaletteNV(org.lwjgl.vulkan.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(org.lwjgl.vulkan.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_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportShadingRateImageStateCreateInfoNV::pShadingRatePalettesvalues used to create the currently active pipeline.Valid Usage
- The
shadingRateImagefeature must be enabled - The sum of
firstViewportandviewportCountmust be between 1 andVkPhysicalDeviceLimits::maxViewports, inclusive - If the
multiViewportfeature is not enabled,firstViewportmust be 0 - If the
multiViewportfeature is not enabled,viewportCountmust be 1
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepShadingRatePalettesmust be a valid pointer to an array ofviewportCountvalidVkShadingRatePaletteNVstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
viewportCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 ofVkShadingRatePaletteNVstructures defining the palette for each viewport.
- The
-
nvkCmdSetCoarseSampleOrderNV
public static void nvkCmdSetCoarseSampleOrderNV(org.lwjgl.vulkan.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(org.lwjgl.vulkan.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
sampleOrderTypeisCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated inpCustomSampleOrderswill 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_NVset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportCoarseSampleOrderStateCreateInfoNVvalues used to create the currently active pipeline.Valid Usage
- If
sampleOrderTypeis notCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV,customSamplerOrderCountmust be 0 - The array
pCustomSampleOrdersmust not contain two structures with matching values for both theshadingRateandsampleCountmembers
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlesampleOrderTypemust be a validVkCoarseSampleOrderTypeNVvalue- If
customSampleOrderCountis not 0,pCustomSampleOrdersmust be a valid pointer to an array ofcustomSampleOrderCountvalidVkCoarseSampleOrderCustomNVstructures commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 ofVkCoarseSampleOrderCustomNVstructures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.
- If
-