cmdSetDiscardRectangleEXT :: MonadIO io=> CommandBuffercommandBufferis the command buffer into which the command will be recorded.->"firstDiscardRectangle"
::: Word32firstDiscardRectangleis the index of the first discard rectangle whose state is updated by the command.->"discardRectangles"
::: Vector Rect2DpDiscardRectanglesis a pointer to an array of Rect2D structures specifying discard rectangles.-> io ()
vkCmdSetDiscardRectangleEXT - Set discard rectangles dynamically for a command buffer
Description
The discard rectangle taken from element i of pDiscardRectangles
replace the current state for the discard rectangle at index
firstDiscardRectangle + i, for i in [0, discardRectangleCount).
This command sets the discard rectangles for subsequent drawing commands
when drawing using
shader objects,
or when the graphics pipeline is created with
DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
set in
PipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
PipelineDiscardRectangleStateCreateInfoEXT::pDiscardRectangles
values used to create the currently active pipeline.
Valid Usage
The sum of
firstDiscardRectangleanddiscardRectangleCountmust be less than or equal to PhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles
The
xandymember ofoffsetin each Rect2D element ofpDiscardRectanglesmust be greater than or equal to0Evaluation of (
offset.x+extent.width) in each Rect2D element ofpDiscardRectanglesmust not cause a signed integer addition overflowEvaluation of (
offset.y+extent.height) in each Rect2D element ofpDiscardRectanglesmust not cause a signed integer addition overflowIf this command is recorded in a secondary command buffer with CommandBufferInheritanceViewportScissorInfoNV::
viewportScissor2Denabled, then this function must not be called
Valid Usage (Implicit)
commandBuffermust be a valid CommandBuffer handle
pDiscardRectanglesmust be a valid pointer to an array ofdiscardRectangleCountRect2D structurescommandBuffermust 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
discardRectangleCountmust be greater than0
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
vkCmdSetDiscardRectangleEXT is not affected by conditional rendering