HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_depth_clamp_control

Name

VK_EXT_depth_clamp_control - device extension

VK_EXT_depth_clamp_control

Name String

VK_EXT_depth_clamp_control

Extension Type

Device extension

Registered Extension Number

583

Revision

1

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

Contact
Extension Proposal

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

New Enums

New Enum Constants

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

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.

  • 6 types
  • 1 value
  • Packagevulkan-3.27
  • Exports11
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_depth_clamp_control.hs
valuecmdSetDepthClampRangeEXT
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> DepthClampModeEXT

    depthClampMode determines how the clamp range is determined for each viewport.

  4. -> "depthClampRange" ::: Maybe DepthClampRangeEXT

    pDepthClampRange sets the depth clamp range for all viewports if depthClampMode is DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.

  5. -> io ()
#

vkCmdSetDepthClampRangeEXT - Set the viewport depth clamp range dynamically for a command buffer

Description

This command sets the viewport depth clamp range for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT set in PipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the PipelineViewportDepthClampControlCreateInfoEXT::depthClampMode value used to create the currently active pipeline.

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Conditional Rendering

vkCmdSetDepthClampRangeEXT is not affected by conditional rendering

See Also

VK_EXT_depth_clamp_control, VK_EXT_shader_object, CommandBuffer, DepthClampModeEXT, DepthClampRangeEXT

VkPhysicalDeviceDepthClampControlFeaturesEXT - Structure describing additional depth clamp control supported by an implementation

Members

This structure describes the following feature:

Description

If the PhysicalDeviceDepthClampControlFeaturesEXT structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceDepthClampControlFeaturesEXT, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Structure Chaining

Extends the structures

See Also

VK_EXT_depth_clamp_control, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPipelineViewportDepthClampControlCreateInfoEXT - Structure specifying parameters of a newly created pipeline depth clamp control state

Description

This structure extends PipelineViewportStateCreateInfo and specifies the depth clamp range used in the pipeline. If this structure is not provided in the next chain then depthClampMode defaults to DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT.

Valid Usage

Valid Usage (Implicit)

Structure Chaining

Extends the structure

See Also

VK_EXT_depth_clamp_control, DepthClampModeEXT, DepthClampRangeEXT, StructureType

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero
datadata DepthClampRangeEXT
#

VkDepthClampRangeEXT - Structure specifying a depth clamp range

Valid Usage

  • minDepthClamp must be less than or equal to maxDepthClamp

  • If the VK_EXT_depth_range_unrestricted extension is not enabled, minDepthClamp must be greater than or equal to 0.0

  • If the VK_EXT_depth_range_unrestricted extension is not enabled, maxDepthClamp must be less than or equal to 1.0

See Also

VK_EXT_depth_clamp_control, PipelineViewportDepthClampControlCreateInfoEXT, cmdSetDepthClampRangeEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
newtypenewtype DepthClampModeEXT
#

VkDepthClampModeEXT - Modes that determine the depth clamp range

Description

  • DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT specifies that the depth clamp range follows the viewport depth range. The depth clamp range of each viewport will implicitly be set to zmin = min(n,f) and zmax = max(n,f), where n and f are the minDepth and maxDepth depth range values of the viewport.

See Also

VK_EXT_depth_clamp_control, PipelineViewportDepthClampControlCreateInfoEXT, cmdSetDepthClampRangeEXT

Instances6Eq, Ord, Read, Show, Storable, Zero