VkPipelineDiscardRectangleStateCreateInfoEXT
The VkPipelineDiscardRectangleStateCreateInfoEXT structure is defined
as:
typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkPipelineDiscardRectangleStateCreateFlagsEXT flags;
VkDiscardRectangleModeEXT discardRectangleMode;
uint32_t discardRectangleCount;
const VkRect2D* pDiscardRectangles;
} VkPipelineDiscardRectangleStateCreateInfoEXT;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.flagsis reserved for future use.discardRectangleModeis a VkDiscardRectangleModeEXT value determining whether the discard rectangle test is inclusive or exclusive.discardRectangleCountis the number of discard rectangles to use.pDiscardRectanglesis a pointer to an array of VkRect2D structures defining discard rectangles.
If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state is enabled
for a pipeline, the pDiscardRectangles member is ignored.
If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT dynamic state is
not enabled for the pipeline the presence of this structure in the
VkGraphicsPipelineCreateInfo chain, and a discardRectangleCount
greater than zero, implicitly enables discard rectangles in the pipeline,
otherwise discard rectangles must enabled or disabled by
vkCmdSetDiscardRectangleEnableEXT.
If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic state is
enabled for the pipeline, the discardRectangleMode member is ignored,
and the discard rectangle mode must be set by
vkCmdSetDiscardRectangleModeEXT.
When this structure is included in the pNext chain of
VkGraphicsPipelineCreateInfo, it defines parameters of the discard
rectangle test.
If the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state is not
enabled, and this structure is not included in the pNext chain, it is
equivalent to specifying this structure with a discardRectangleCount
of 0.
If all VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT,
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT, and
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT dynamic states are
enabled, the application can omit this structure from the pNext chain
of VkGraphicsPipelineCreateInfo and still use discard rectangles by
setting all state dynamically.
In this case vkCmdSetDiscardRectangleEXT must be called to set the
discard rectangle for all indices [0, maxDiscardRectangles)
before drawing with discard rectangles enabled.
Individual discard rectangles can be made ineffective by setting their
VkRect2D::extent.width and VkRect2D::extent.height
to zero.
Valid Usage
VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleCount-00582
discardRectangleCount must be less than or equal to
VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles
Valid Usage (Implicit)
VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType
sType must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT
VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter
discardRectangleMode must be a valid VkDiscardRectangleModeEXT value