Class EXTDiscardRectangles
- java.lang.Object
-
- org.lwjgl.vulkan.EXTDiscardRectangles
-
public class EXTDiscardRectangles extends java.lang.ObjectThis extension provides additional orthogonally aligned "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_EXTmode) or be rejected if the fragment is within any of the operational discard rectangles (DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXTmode).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.
- Name String
VK_EXT_discard_rectangles- Extension Type
- Device extension
- Registered Extension Number
- 100
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Contact
- Piers Daniell pdaniell-nv
- Last Modified Date
- 2016-12-22
- Interactions and External Dependencies
- Interacts with VK_KHR_device_group
- Interacts with Vulkan 1.1
- Contributors
- Daniel Koch, NVIDIA
- Jeff Bolz, NVIDIA
-
-
Field Summary
Fields Modifier and Type Field Description static intVK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXTVkDiscardRectangleModeEXT - Specify the discard rectangle modestatic intVK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXTExtendsVkDynamicState.static java.lang.StringVK_EXT_DISCARD_RECTANGLES_EXTENSION_NAMEThe extension name.static intVK_EXT_DISCARD_RECTANGLES_SPEC_VERSIONThe extension specification version.static intVK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXTExtendsVkStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, int discardRectangleCount, long pDiscardRectangles)Unsafe version of:CmdSetDiscardRectangleEXTstatic voidvkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, VkRect2D.Buffer pDiscardRectangles)Set discard rectangles dynamically.
-
-
-
Field Detail
-
VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION
The extension specification version.
-
VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT
ExtendsVkStructureType.Enum values:
-
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
ExtendsVkDynamicState.
-
VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
VkDiscardRectangleModeEXT - Specify the discard rectangle modeDescription
DISCARD_RECTANGLE_MODE_INCLUSIVE_EXTspecifies that a fragment within any discard rectangle satisfies the test.DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXTspecifies that a fragment not within any of the discard rectangles satisfies the test.
See Also
-
-
Method Detail
-
nvkCmdSetDiscardRectangleEXT
public static void nvkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, int discardRectangleCount, long pDiscardRectangles)
Unsafe version of:CmdSetDiscardRectangleEXT- Parameters:
discardRectangleCount- the number of discard rectangles whose state are updated by the command.
-
vkCmdSetDiscardRectangleEXT
public static void vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, int firstDiscardRectangle, VkRect2D.Buffer pDiscardRectangles)
Set discard rectangles dynamically.C Specification
If the pipeline state object was created with the
DYNAMIC_STATE_DISCARD_RECTANGLE_EXTdynamic 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);Description
The discard rectangle taken from element
iofpDiscardRectanglesreplace the current state for the discard rectangle indexfirstDiscardRectangle + i, foriin[0, discardRectangleCount).Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_DISCARD_RECTANGLE_EXTdynamic state enabled - The sum of
firstDiscardRectangleanddiscardRectangleCountmust be less than or equal toVkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles - The
xandymember ofoffsetin eachVkRect2Delement ofpDiscardRectanglesmust be greater than or equal to 0 - Evaluation of
(offset.x + extent.width)in eachVkRect2Delement ofpDiscardRectanglesmust not cause a signed integer addition overflow - Evaluation of
(offset.y + extent.height)in eachVkRect2Delement ofpDiscardRectanglesmust not cause a signed integer addition overflow
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepDiscardRectanglesmust be a valid pointer to an array ofdiscardRectangleCountVkRect2DstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations discardRectangleCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics See Also
- Parameters:
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 ofVkRect2Dstructures specifying discard rectangles.
- The bound graphics pipeline must have been created with the
-
-