VK_EXT_depth_clamp_control
Other Extension Metadata
Last Modified Date
2024-07-15
Contributors
- Jules Blok, Independent
Description
This extension allows the application to control the viewport depth clamp
range separately from the viewport minDepth
and maxDepth
.
This gives the ability for the application to restrict depth values to an
application-defined range rather than
the viewport depth range or the range defined in the
VK_EXT_depth_clamp_zero_one extension.
It can be used to set a smaller or larger clamping range than the viewport depth range without affecting the depth mapping of the viewport transform. Another possible use of this extension is to restrict depth values beyond the viewport depth range to a clamping range other than the [0, 1] range defined in the VK_EXT_depth_clamp_zero_one extension.
New Commands
New Structures
- VkDepthClampRangeEXT
- Extending VkPhysicalDeviceFeatures2, VkDeviceCreateInfo:
- Extending VkPipelineViewportStateCreateInfo:
New Enums
New Enum Constants
VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME
VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION
- Extending VkDynamicState:
VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT
- Extending VkStructureType:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT
Issues
1) Should the depth clamp range be a per-viewport parameter?
RESOLVED: No. Because the depth clamp range was previously defined to be equal to the viewport depth range, conformant runtimes are already handling the depth clamp range as a per-viewport parameter. However because of complexities from interactions with multiple viewports a per-viewport clamp range is left to a future extensions if a use case arises.
2) Should this pipeline state be dynamic?
RESOLVED: Yes. Since the viewport depth range can already be a dynamic state conformant runtimes are already able to handle the depth clamp range as a dynamic state.
3) Can the depth clamp range be ignored when depth clamping is disabled?
RESOLVED: Yes. This extension overrides the clamping range used only when depth clamping is enabled. The alternative would be highly unintuitive. As a consequence the VK_EXT_depth_clip_enable extension is required if depth clipping is desired in combination with this extension.
Version History
- Revision 1, 2024-02-13 (Jules Blok)
- Initial draft