vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_depth_clamp_control

Description

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.

Synopsis

Documentation

cmdSetDepthClampRangeEXT Source #

Arguments

:: MonadIO io 
=> CommandBuffer

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

-> DepthClampModeEXT

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

-> ("depthClampRange" ::: Maybe DepthClampRangeEXT)

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

-> 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

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBoth Outside VK_QUEUE_GRAPHICS_BIT State

Conditional Rendering

vkCmdSetDepthClampRangeEXT is not affected by conditional rendering

See Also

VK_EXT_depth_clamp_control, VK_EXT_shader_object, CommandBuffer, DepthClampModeEXT, DepthClampRangeEXT

data PhysicalDeviceDepthClampControlFeaturesEXT Source #

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.

Valid Usage (Implicit)

See Also

VK_EXT_depth_clamp_control, Bool32, StructureType

Constructors

PhysicalDeviceDepthClampControlFeaturesEXT 

Fields

Instances

Instances details
Eq PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Storable PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Show PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

FromCStruct PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

ToCStruct PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Zero PhysicalDeviceDepthClampControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

data PipelineViewportDepthClampControlCreateInfoEXT Source #

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)

See Also

VK_EXT_depth_clamp_control, DepthClampModeEXT, DepthClampRangeEXT, StructureType

Constructors

PipelineViewportDepthClampControlCreateInfoEXT 

Fields

Instances

Instances details
Show PipelineViewportDepthClampControlCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

FromCStruct PipelineViewportDepthClampControlCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

ToCStruct PipelineViewportDepthClampControlCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Zero PipelineViewportDepthClampControlCreateInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

data DepthClampRangeEXT Source #

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

DepthClampRangeEXT 

Fields

Instances

Instances details
Eq DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Storable DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Show DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

FromCStruct DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

ToCStruct DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Zero DepthClampRangeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

newtype DepthClampModeEXT Source #

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

Constructors

DepthClampModeEXT Int32 

Instances

Instances details
Eq DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Ord DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Storable DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Read DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Show DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

Zero DepthClampModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_depth_clamp_control

type EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clamp_control" Source #