| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
Extending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PipelineViewportStateCreateInfo:
New Enums
New Enum Constants
EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSIONExtending
DynamicState:Extending
StructureType:
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
- cmdSetDepthClampRangeEXT :: MonadIO io => CommandBuffer -> DepthClampModeEXT -> ("depthClampRange" ::: Maybe DepthClampRangeEXT) -> io ()
- data PhysicalDeviceDepthClampControlFeaturesEXT = PhysicalDeviceDepthClampControlFeaturesEXT {}
- data PipelineViewportDepthClampControlCreateInfoEXT = PipelineViewportDepthClampControlCreateInfoEXT {}
- data DepthClampRangeEXT = DepthClampRangeEXT {}
- newtype DepthClampModeEXT where
- type EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION = 1
- pattern EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION :: Integral a => a
- type EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clamp_control"
- pattern EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME :: (Eq a, IsString a) => a
Documentation
cmdSetDepthClampRangeEXT Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> DepthClampModeEXT |
|
| -> ("depthClampRange" ::: Maybe DepthClampRangeEXT) |
|
| -> 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
- If
depthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, thenpDepthClampRangemust be a valid pointer to a validDepthClampRangeEXTstructure
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
depthClampModemust be a validDepthClampModeEXTvalue - If
pDepthClampRangeis notNULL,pDepthClampRangemust be a valid pointer to a validDepthClampRangeEXTstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_GRAPHICS_BIToperations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Both | 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
Constructors
| PhysicalDeviceDepthClampControlFeaturesEXT | |
Fields
| |
Instances
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
-
If
depthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, and the pipeline is not created withDYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT, thenpDepthClampRangemust be a valid pointer to a validDepthClampRangeEXTstructure
Valid Usage (Implicit)
-
depthClampModemust be a validDepthClampModeEXTvalue -
If
pDepthClampRangeis notNULL,pDepthClampRangemust be a valid pointer to a validDepthClampRangeEXTstructure
See Also
VK_EXT_depth_clamp_control,
DepthClampModeEXT, DepthClampRangeEXT,
StructureType
Constructors
| PipelineViewportDepthClampControlCreateInfoEXT | |
Fields
| |
Instances
data DepthClampRangeEXT Source #
VkDepthClampRangeEXT - Structure specifying a depth clamp range
Valid Usage
- If the
VK_EXT_depth_range_unrestrictedextension is not enabled,minDepthClampmust be greater than or equal to0.0 - If the
VK_EXT_depth_range_unrestrictedextension is not enabled,maxDepthClampmust be less than or equal to1.0
See Also
VK_EXT_depth_clamp_control,
PipelineViewportDepthClampControlCreateInfoEXT,
cmdSetDepthClampRangeEXT
Constructors
| DepthClampRangeEXT | |
Fields
| |
Instances
newtype DepthClampModeEXT Source #
VkDepthClampModeEXT - Modes that determine the depth clamp range
Description
DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXTspecifies 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 theminDepthandmaxDepthdepth range values of the viewport.
DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXTspecifies that a single user-defined depth clamp range will be used for all viewports. The user-defined depth clamp range is defined by theminDepthClampandmaxDepthClampmembers ofDepthClampRangeEXT.
See Also
VK_EXT_depth_clamp_control,
PipelineViewportDepthClampControlCreateInfoEXT,
cmdSetDepthClampRangeEXT
Constructors
| DepthClampModeEXT Int32 |
Bundled Patterns
| pattern DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT :: DepthClampModeEXT | |
| pattern DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT :: DepthClampModeEXT |
Instances
type EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION = 1 Source #
pattern EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION :: Integral a => a Source #
type EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clamp_control" Source #
pattern EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME :: (Eq a, IsString a) => a Source #