C Specification

The discard rectangles test determines if fragment’s framebuffer coordinates (xf,yf) are inclusive or exclusive to a set of discard-space rectangles. The discard rectangles are set with the VkPipelineDiscardRectangleStateCreateInfoEXT pipeline state, which is defined as:

typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT {
VkStructureType                                  sType;
const void*                                      pNext;
} VkPipelineDiscardRectangleStateCreateInfoEXT;

Members

• sType is the type of this structure.

• pNext is NULL or a pointer to an extension-specific structure.

• flags is reserved for future use.

• discardRectangleMode is the mode used to determine whether fragments that lie within the discard rectangle are discarded or not.

• discardRectangleCount is the number of discard rectangles used by the pipeline.

• pDiscardRectangles is a pointer to an array of VkRect2D structures, defining the discard rectangles. If the discard rectangle state is dynamic, this member is ignored.

Description

Valid Usage
• discardRectangleCount must be between 0 and VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles, inclusive

Valid Usage (Implicit)
• sType must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT

• flags must be 0

• discardRectangleMode must be a valid VkDiscardRectangleModeEXT value