cmdSetFragmentShadingRateKHR :: MonadIO io=> CommandBuffercommandBufferis the command buffer into which the command will be recorded.->"fragmentSize"
::: Extent2DpFragmentSizespecifies the pipeline fragment shading rate for subsequent drawing commands.->"combinerOps"
::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)combinerOpsspecifies a FragmentShadingRateCombinerOpKHR determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by subsequent drawing commands.-> io ()
vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate and combiner operation dynamically for a command buffer
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
DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR
set in
PipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
PipelineFragmentShadingRateStateCreateInfoKHR values used to create
the currently active pipeline.
Valid Usage
If the pipelineFragmentShadingRate feature is not enabled,
pFragmentSize->widthmust be1
If the pipelineFragmentShadingRate feature is not enabled,
pFragmentSize->heightmust be1One of the pipelineFragmentShadingRate, primitiveFragmentShadingRate, or attachmentFragmentShadingRate features must be enabled
If the primitiveFragmentShadingRate feature is not enabled,
combinerOps[0] must be FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHRIf the attachmentFragmentShadingRate feature is not enabled,
combinerOps[1] must be FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHRIf the fragmentSizeNonTrivialCombinerOps limit is not supported, elements of
combinerOpsmust be either FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHRpFragmentSize->widthmust be greater than or equal to1pFragmentSize->heightmust be greater than or equal to1pFragmentSize->widthmust be a power-of-two valuepFragmentSize->heightmust be a power-of-two valuepFragmentSize->widthmust be less than or equal to4pFragmentSize->heightmust be less than or equal to4
Valid Usage (Implicit)
commandBuffermust be a valid CommandBuffer handle
pFragmentSizemust be a valid pointer to a valid Extent2D structureEach element of
combinerOpsmust be a valid FragmentShadingRateCombinerOpKHR valuecommandBuffermust be in the recording stateThe CommandPool that
commandBufferwas allocated from must support QUEUE_GRAPHICS_BIT operationsThis command must only be called outside of a video coding scope
Host Synchronization
Host access to
commandBuffermust be externally synchronized
Host access to the CommandPool that
commandBufferwas allocated from must be externally synchronized
Command Properties
'
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State |
Conditional Rendering
vkCmdSetFragmentShadingRateKHR is not affected by conditional rendering
See Also
VK_KHR_fragment_shading_rate, CommandBuffer, Extent2D, FragmentShadingRateCombinerOpKHR