To dynamically set whether discard rectangles are enabled, call:
// Provided by VK_EXT_discard_rectangles void vkCmdSetDiscardRectangleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable);
commandBufferis the command buffer into which the command will be recorded.
discardRectangleEnablespecifies whether discard rectangles are enabled or not.
This command sets the discard rectangle enable for subsequent drawing
when drawing using shader objects, or
when the graphics pipeline is created with
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT set in
Otherwise, this state is implied by the
value used to create the currently active pipeline, where a non-zero
discardRectangleCount implicitly enables discard rectangles, otherwise
they are disabled.
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.