C Specification
To dynamically set the discard rectangles, call:
// Provided by VK_EXT_discard_rectangles
void vkCmdSetDiscardRectangleEXT(
VkCommandBuffer commandBuffer,
uint32_t firstDiscardRectangle,
uint32_t discardRectangleCount,
const VkRect2D* pDiscardRectangles);
Parameters
-
commandBuffer
is the command buffer into which the command will be recorded. -
firstDiscardRectangle
is the index of the first discard rectangle whose state is updated by the command. -
discardRectangleCount
is the number of discard rectangles whose state are updated by the command. -
pDiscardRectangles
is a pointer to an array of VkRect2D structures specifying discard rectangles.
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 the graphics pipeline is created with
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
set in
VkPipelineDynamicStateCreateInfo::pDynamicStates
.
Otherwise, this state is specified by the
VkPipelineDiscardRectangleStateCreateInfoEXT::pDiscardRectangles
values used to create the currently active pipeline.
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.