VK_EXT_discard_rectangles(3)

# VK_EXT_discard_rectangles(3) Manual Page

## Name

VK_EXT_discard_rectangles - device extension

## Registered Extension Number

100

## Revision

2

## Ratification Status

Ratified

## Extension and Version Dependencies

VK_KHR_get_physical_device_properties2
or
Vulkan Version 1.1

## Contact

- Piers Daniell [GitHub]pdaniell-nv

## Other Extension Metadata

Last Modified Date

  2023-01-18

Interactions and External Dependencies

  - Interacts with `VK_KHR_device_group`

  - Interacts with Vulkan 1.1

Contributors

  - Daniel Koch, NVIDIA

  - Jeff Bolz, NVIDIA

## Description

This 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 (VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT mode) or be rejected if the fragment is within any of the operational discard rectangles (VK_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 VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT and VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT, and the corresponding functions vkCmdSetDiscardRectangleEnableEXT and vkCmdSetDiscardRectangleModeEXT. Applications that use these dynamic states must ensure the implementation advertises at least `specVersion` `2` of this extension.

## New Commands

- vkCmdSetDiscardRectangleEXT

- vkCmdSetDiscardRectangleEnableEXT

- vkCmdSetDiscardRectangleModeEXT

## New Structures

- Extending VkGraphicsPipelineCreateInfo:

  - VkPipelineDiscardRectangleStateCreateInfoEXT

- Extending VkPhysicalDeviceProperties2:

  - VkPhysicalDeviceDiscardRectanglePropertiesEXT

## New Enums

- VkDiscardRectangleModeEXT

## New Bitmasks

- VkPipelineDiscardRectangleStateCreateFlagsEXT

## New Enum Constants

- `VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME`

- `VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION`

- Extending VkDynamicState:

  - VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT

  - VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT

  - VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT

- Extending VkStructureType:

  - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT

  - VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT

## Version History

- Revision 2, 2023-01-18 (Piers Daniell)

  - Add dynamic states for discard rectangle enable/disable and mode.

- Revision 1, 2016-12-22 (Piers Daniell)

  - Internal revisions

## See Also

No cross-references are available

## Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0