Class EXTDepthClampControl
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.
- Name String
VK_EXT_depth_clamp_control- Extension Type
- Device extension
- Registered Extension Number
- 583
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2or Version 1.1- Contact
- Jules Blok jules
- Extension Proposal
- VK_EXT_depth_clamp_control
Other Extension Metadata
- Last Modified Date
- 2024-07-15
- Contributors
- Jules Blok, Independent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsVkDynamicState.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, long pDepthClampRange) Unsafe version of:CmdSetDepthClampRangeEXTstatic voidvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, @Nullable VkDepthClampRangeEXT pDepthClampRange) Set the viewport depth clamp range dynamically for a command buffer.
-
Field Details
-
VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION
public static final int VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXTExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXTExtendsVkStructureType.Enum values:
- See Also:
-
VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT
public static final int VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXTExtendsVkDynamicState.- See Also:
-
-
Method Details
-
nvkCmdSetDepthClampRangeEXT
public static void nvkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, long pDepthClampRange) Unsafe version of:CmdSetDepthClampRangeEXT -
vkCmdSetDepthClampRangeEXT
public static void vkCmdSetDepthClampRangeEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int depthClampMode, @Nullable VkDepthClampRangeEXT pDepthClampRange) Set the viewport depth clamp range dynamically for a command buffer.C Specification
To dynamically set the viewport depth clamp range parameters, call:
void vkCmdSetDepthClampRangeEXT( VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange);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_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineViewportDepthClampControlCreateInfoEXT::depthClampModevalue used to create the currently active pipeline.Valid Usage
- If
depthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, thenpDepthClampRangemust be a valid pointer to a validVkDepthClampRangeEXTstructure
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandledepthClampModemust be a validVkDepthClampModeEXTvalue- If
pDepthClampRangeis notNULL,pDepthClampRangemust be a valid pointer to a validVkDepthClampRangeEXTstructure commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - 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
VkCommandPoolthatcommandBufferwas 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 Graphics State See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.depthClampMode- determines how the clamp range is determined for each viewport.pDepthClampRange- sets the depth clamp range for all viewports ifdepthClampModeisDEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT.
- If
-