public class EXTDiscardRectangles
extends java.lang.Object
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.
VK_EXT_discard_rectanglesVK_KHR_get_physical_device_properties2VK_KHR_device_group| Modifier and Type | Field and Description |
|---|---|
static int |
VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
VkDiscardRectangleModeEXT - Specify the discard rectangle mode
|
static int |
VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
VkDiscardRectangleModeEXT - Specify the discard rectangle mode
|
static int |
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
Extends
VkDynamicState. |
static java.lang.String |
VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME
The extension name.
|
static int |
VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION
The extension specification version.
|
static int |
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static void |
nvkCmdSetDiscardRectangleEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstDiscardRectangle,
int discardRectangleCount,
long pDiscardRectangles)
Unsafe version of:
CmdSetDiscardRectangleEXT |
static void |
vkCmdSetDiscardRectangleEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstDiscardRectangle,
VkRect2D.Buffer pDiscardRectangles)
Set discard rectangles dynamically.
|
public static final int VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION
public static final java.lang.String VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT
VkStructureType.
public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
VkDynamicState.public static final int VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT specifies that a fragment within any discard rectangle satisfies the test.DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT specifies that a fragment not within any of the discard rectangles satisfies the test.public static final int VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT specifies that a fragment within any discard rectangle satisfies the test.DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT specifies that a fragment not within any of the discard rectangles satisfies the test.public static void nvkCmdSetDiscardRectangleEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstDiscardRectangle,
int discardRectangleCount,
long pDiscardRectangles)
CmdSetDiscardRectangleEXTdiscardRectangleCount - the number of discard rectangles whose state are updated by the command.public static void vkCmdSetDiscardRectangleEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstDiscardRectangle,
VkRect2D.Buffer pDiscardRectangles)
If the pipeline state object was created with the DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled, the discard rectangles are dynamically set and changed with the command:
void vkCmdSetDiscardRectangleEXT(
VkCommandBuffer commandBuffer,
uint32_t firstDiscardRectangle,
uint32_t discardRectangleCount,
const VkRect2D* pDiscardRectangles);
The discard rectangle taken from element i of pDiscardRectangles replace the current state for the discard rectangle index firstDiscardRectangle + i, for i in [0, discardRectangleCount).
DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabledfirstDiscardRectangle and discardRectangleCount must be less than or equal to VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectanglesx and y member of offset in each VkRect2D element of pDiscardRectangles must be greater than or equal to 0(offset.x + extent.width) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflow(offset.y + extent.height) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflowcommandBuffer must be a valid VkCommandBuffer handlepDiscardRectangles must be a valid pointer to an array of discardRectangleCount VkRect2D structurescommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationsdiscardRectangleCount must be greater than 0commandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
commandBuffer - the command buffer into which the command will be recorded.firstDiscardRectangle - the index of the first discard rectangle whose state is updated by the command.pDiscardRectangles - a pointer to an array of VkRect2D structures specifying discard rectangles.Copyright LWJGL. All Rights Reserved. License terms.