Skip to content

KDGpu::DepthStencilAttachment

Module: Public API

Depth/stencil attachment configuration for render passes. More...

#include <KDGpu/render_pass_command_recorder_options.h>

Public Attributes

Name
OptionalHandle< TextureView_t > view
The depth/stencil texture view (leave empty if not using depth/stencil)
OptionalHandle< TextureView_t > resolveView
Optional resolve target for MSAA depth/stencil.
AttachmentLoadOperation depthLoadOperation
Depth load operation.
AttachmentStoreOperation depthStoreOperation
Depth store operation.
float depthClearValue
Depth clear value (1.0 = far plane in reverse-Z, 0.0 in standard)
ResolveModeFlagBits depthResolveMode
How to resolve MSAA depth.
AttachmentLoadOperation stencilLoadOperation
Stencil load operation.
AttachmentStoreOperation stencilStoreOperation
Stencil store operation.
uint32_t stencilClearValue
Stencil clear value.
ResolveModeFlagBits stencilResolveMode
How to resolve MSAA stencil.
TextureLayout initialLayout
Layout before render pass.
TextureLayout layout
Layout during rendering.
TextureLayout finalLayout
Layout after render pass.

Detailed Description

1
struct KDGpu::DepthStencilAttachment;

Depth/stencil attachment configuration for render passes.

See: RenderPassCommandRecorderWithDynamicRenderingOptions, ColorAttachment

Configures depth and stencil testing during rendering. Depth and stencil aspects can have independent load/store operations. In Vulkan, this maps to VkRenderingAttachmentInfo for depth/stencil attachments.

Public Attributes Documentation

variable view

1
OptionalHandle< TextureView_t > view;

The depth/stencil texture view (leave empty if not using depth/stencil)

variable resolveView

1
OptionalHandle< TextureView_t > resolveView;

Optional resolve target for MSAA depth/stencil.

variable depthLoadOperation

1
AttachmentLoadOperation depthLoadOperation { AttachmentLoadOperation::Clear };

Depth load operation.

variable depthStoreOperation

1
AttachmentStoreOperation depthStoreOperation { AttachmentStoreOperation::Store };

Depth store operation.

variable depthClearValue

1
float depthClearValue { 1.0f };

Depth clear value (1.0 = far plane in reverse-Z, 0.0 in standard)

variable depthResolveMode

1
ResolveModeFlagBits depthResolveMode { ResolveModeFlagBits::Average };

How to resolve MSAA depth.

variable stencilLoadOperation

1
AttachmentLoadOperation stencilLoadOperation { AttachmentLoadOperation::Clear };

Stencil load operation.

variable stencilStoreOperation

1
AttachmentStoreOperation stencilStoreOperation { AttachmentStoreOperation::Store };

Stencil store operation.

variable stencilClearValue

1
uint32_t stencilClearValue { 0 };

Stencil clear value.

variable stencilResolveMode

1
ResolveModeFlagBits stencilResolveMode { ResolveModeFlagBits::None };

How to resolve MSAA stencil.

variable initialLayout

1
TextureLayout initialLayout { TextureLayout::Undefined };

Layout before render pass.

variable layout

1
TextureLayout layout { TextureLayout::DepthStencilAttachmentOptimal };

Layout during rendering.

variable finalLayout

1
TextureLayout finalLayout { TextureLayout::DepthStencilAttachmentOptimal };

Layout after render pass.


Updated on 2026-03-31 at 00:02:06 +0000