discard rectangles” specified in framebuffer-space coordinates that restrict rasterization of all points, lines and triangles.
From zero to an implementation-dependent limit (specified by maxDiscardRectangles) number of discard rectangles can be operational at once. When one or more discard rectangles are active, rasterized fragments can either survive if the fragment is within any of the operational discard rectangles (DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT mode) or be rejected if the fragment is within any of the operational discard rectangles (DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT mode).
These discard rectangles operate orthogonally to the existing scissor test functionality. The discard rectangles can be different for each physical device in a device group by specifying the device mask and setting discard rectangle dynamic state.
Version 2 of this extension introduces new dynamic states DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT and DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT, and the corresponding functions CmdSetDiscardRectangleEnableEXT and CmdSetDiscardRectangleModeEXT. Applications that use these dynamic states must ensure the implementation advertises at least specVersion 2 of this extension.
VK_EXT_discard_rectanglesVK_KHR_get_physical_device_properties2 or Version 1.1VK_KHR_device_group| Modifier and Type | Field and Description |
|---|---|
| public static final int | VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
VkDiscardRectangleModeEXT - Specify the discard rectangle mode Description
|
| public static final int | VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
VkDiscardRectangleModeEXT - Specify the discard rectangle mode Description
|
| public static final int | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT
Extends |
| public static final int | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
Extends |
| public static final int | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT
Extends |
| public static final String | VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME
The extension name. |
| public static final int | VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION
The extension specification version. |
| public static final int | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static void | nvkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, int
the number of discard rectangles whose state are updated by the command. discardRectangleCount, long pDiscardRectangles)Unsafe version of: |
| public static void | vkCmdSetDiscardRectangleEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded. commandBuffer, boolean specifies whether discard rectangles are enabled or not. discardRectangleEnable)Enable discard rectangles dynamically for a command buffer. |
| public static void | vkCmdSetDiscardRectangleEXT(VkCommandBuffer
the command buffer into which the command will be recorded. commandBuffer, int the index of the first discard rectangle whose state is updated by the command. firstDiscardRectangle, VkRect2D.a pointer to an array of pDiscardRectanglesVkRect2D structures specifying discard rectangles.Set discard rectangles dynamically for a command buffer. |
| public static void | vkCmdSetDiscardRectangleModeEXT(VkCommandBuffer
the command buffer into which the command will be recorded. commandBuffer, int specifies the discard rectangle mode for all discard rectangles, either inclusive or exclusive. discardRectangleMode)Sets the discard rectangle mode dynamically for a command buffer. |
| VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT | back to summary |
|---|---|
| public static final int VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT VkDiscardRectangleModeEXT - Specify the discard rectangle mode Description
See Also
| |
| VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT | back to summary |
|---|---|
| public static final int VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT VkDiscardRectangleModeEXT - Specify the discard rectangle mode Description
See Also
| |
| VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT | back to summary |
|---|---|
| public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT Extends Enum values: | |
| VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT | back to summary |
|---|---|
| public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT Extends Enum values: | |
| VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT | back to summary |
|---|---|
| public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT Extends Enum values: | |
| VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME The extension name. | |
| VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION The extension specification version. | |
| VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT Extends Enum values: | |
| VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT Extends Enum values: | |
| EXTDiscardRectangles | back to summary |
|---|---|
| protected EXTDiscardRectangles() | |
| nvkCmdSetDiscardRectangleEXT | back to summary |
|---|---|
| public static void nvkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, int discardRectangleCount, long pDiscardRectangles) Unsafe version of:
| |
| vkCmdSetDiscardRectangleEnableEXT | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void vkCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, boolean discardRectangleEnable) Enable discard rectangles dynamically for a command buffer. C SpecificationTo dynamically set whether discard rectangles are enabled, call:
DescriptionThis command sets the discard rectangle enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with Valid Usage
Valid Usage (Implicit)
Host Synchronization
Command Properties
| |||||||||||
| vkCmdSetDiscardRectangleEXT | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, VkRect2D. Set discard rectangles dynamically for a command buffer. C SpecificationTo dynamically set the discard rectangles, call:
DescriptionThe discard rectangle taken from element This command sets the discard rectangles for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with Valid Usage
Valid Usage (Implicit)
Host Synchronization
Command Properties
See Also
| |||||||||||
| vkCmdSetDiscardRectangleModeEXT | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void vkCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, int discardRectangleMode) Sets the discard rectangle mode dynamically for a command buffer. C SpecificationTo dynamically set the discard rectangle mode, call:
DescriptionThis command sets the discard rectangle mode for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with Valid Usage
Valid Usage (Implicit)
Host Synchronization
Command Properties
| |||||||||||