vkCmdSetFragmentShadingRateKHR(3)

Name

vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate and combiner operation dynamically for a command buffer

C Specification

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

// Provided by VK_KHR_fragment_shading_rate
void vkCmdSetFragmentShadingRateKHR(
    VkCommandBuffer                             commandBuffer,
    const VkExtent2D*                           pFragmentSize,
    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 VkPipelineFragmentShadingRateStateCreateInfoKHR values used to create the currently active pipeline.

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

  • VUID-vkCmdSetFragmentShadingRateKHR-pFragmentSize-parameter
    pFragmentSize must be a valid pointer to a valid VkExtent2D structure

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

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

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

  • VUID-vkCmdSetFragmentShadingRateKHR-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

vkCmdSetFragmentShadingRateKHR 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.