vkCmdSetFragmentShadingRateEnumNV(3)

Name

vkCmdSetFragmentShadingRateEnumNV - Set pipeline fragment shading rate dynamically for a command buffer using enums

C Specification

To dynamically set the pipeline fragment shading rate and combiner operation, call:

// Provided by VK_NV_fragment_shading_rate_enums
void vkCmdSetFragmentShadingRateEnumNV(
    VkCommandBuffer                             commandBuffer,
    VkFragmentShadingRateNV                     shadingRate,
    const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]);

Parameters

Description

This command sets the pipeline fragment shading rate and combiner operation for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineFragmentShadingRateEnumStateCreateInfoNV values used to create the currently active pipeline.

This command allows specifying additional shading rates beyond those supported by vkCmdSetFragmentShadingRateKHR. For more information, refer to the VK_NV_fragment_shading_rate_enums appendix.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdSetFragmentShadingRateEnumNV-shadingRate-parameter
    shadingRate must be a valid VkFragmentShadingRateNV value

  • VUID-vkCmdSetFragmentShadingRateEnumNV-combinerOps-parameter
    Each element of combinerOps must be a valid VkFragmentShadingRateCombinerOpKHR value

  • VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

  • VUID-vkCmdSetFragmentShadingRateEnumNV-videocoding
    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 Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type

Primary
Secondary

Both

Outside

VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdSetFragmentShadingRateEnumNV is not affected by conditional rendering

Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.