Skip to content

KDGpu::ColorAttachment

Module: Public API

Color attachment configuration for render passes. More...

#include <KDGpu/render_pass_command_recorder_options.h>

Public Attributes

Name
RequiredHandle< TextureView_t > view
The texture view to render to.
OptionalHandle< TextureView_t > resolveView
Optional resolve target for MSAA (leave empty for non-MSAA)
AttachmentLoadOperation loadOperation
How to handle existing data (Clear, Load, or DontCare)
AttachmentStoreOperation storeOperation
Whether to store results (Store or DontCare)
ColorClearValue clearValue
Clear color if loadOperation is Clear.
TextureLayout initialLayout
Layout before render pass (Undefined if discarding contents)
TextureLayout layout
Layout during rendering.
TextureLayout finalLayout
Layout after render pass (e.g., PresentSrc for swapchain)

Detailed Description

1
struct KDGpu::ColorAttachment;

Color attachment configuration for render passes.

See: RenderPassCommandRecorderWithDynamicRenderingOptions, DepthStencilAttachment

Specifies how a color attachment is used during rendering, including load/store operations and image layout transitions. In Vulkan, this maps to VkRenderingAttachmentInfo.

Public Attributes Documentation

variable view

1
RequiredHandle< TextureView_t > view;

The texture view to render to.

variable resolveView

1
OptionalHandle< TextureView_t > resolveView;

Optional resolve target for MSAA (leave empty for non-MSAA)

variable loadOperation

1
AttachmentLoadOperation loadOperation { AttachmentLoadOperation::Clear };

How to handle existing data (Clear, Load, or DontCare)

variable storeOperation

1
AttachmentStoreOperation storeOperation { AttachmentStoreOperation::Store };

Whether to store results (Store or DontCare)

variable clearValue

1
ColorClearValue clearValue;

Clear color if loadOperation is Clear.

variable initialLayout

1
TextureLayout initialLayout { TextureLayout::Undefined };

Layout before render pass (Undefined if discarding contents)

variable layout

1
TextureLayout layout { TextureLayout::ColorAttachmentOptimal };

Layout during rendering.

variable finalLayout

1
TextureLayout finalLayout { TextureLayout::ColorAttachmentOptimal };

Layout after render pass (e.g., PresentSrc for swapchain)


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