vkCmdSetDiscardRectangleModeEXT
To dynamically set the discard rectangle mode, call:
void vkCmdSetDiscardRectangleModeEXT(
VkCommandBuffer commandBuffer,
VkDiscardRectangleModeEXT discardRectangleMode);
commandBuffer
is the command buffer into which the command will be recorded.discardRectangleMode
specifies the discard rectangle mode for all discard rectangles, either inclusive or exclusive.
This command sets the discard rectangle mode for subsequent drawing commands
when drawing using shader objects, or
when the graphics pipeline is created with
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT
set in
VkPipelineDynamicStateCreateInfo::pDynamicStates
.
Otherwise, this state is specified by the
VkPipelineDiscardRectangleStateCreateInfoEXT::discardRectangleMode
value used to create the currently active pipeline.
Valid Usage
VUID-vkCmdSetDiscardRectangleModeEXT-specVersion-07852
The VK_EXT_discard_rectangles extension must be enabled, and
the implementation must support at least specVersion
2
of this
extension
Valid Usage (Implicit)
VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdSetDiscardRectangleModeEXT-discardRectangleMode-parameter
discardRectangleMode
must be a valid VkDiscardRectangleModeEXT value
VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support graphics operations
VUID-vkCmdSetDiscardRectangleModeEXT-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
thatcommandBuffer
was allocated from must be externally synchronized ::