Struct AttachmentDescription

Describes an image attachment in a render pass or framebuffer

struct AttachmentDescription ;

Fields

NameTypeDescription
format Formatthe format of the attachment
layoutTrans Trans!(gfx.graal.image.ImageLayout)The ImageLayout transition of the attachment. layoutTrans.from is the initial layout of the attachment when it enters the render pass. it is up to the programmer to ensure that the attachment will be in this state. layoutTrans.to is the layout of the attachment when it exits the render pass.
mayAlias std.typecons.Flag!("mayAlias")Set mayAlias to Yes if a part of the attachment memory is shared with parts of other attachments in the same render pass.
ops AttachmentOpsthe operations to be performed on the attachment color and depth attachments may only need to define the ops member depth-stencil attachments must define both ops (for depth) and stencilOps members.
samples uintSample count of the attachment Must be a power of two between 1 and 64
stencilOps AttachmentOpsthe operations to be performed on the attachment color and depth attachments may only need to define the ops member depth-stencil attachments must define both ops (for depth) and stencilOps members.

Methods

NameDescription
color (format, ops, layoutTrans) Build a color attachment description
depth (format, ops, layoutTrans) Build a depth attachment description
depthStencil (format, depthOps, stencilOps, layoutTrans) Build a depth-stencil attachment description
withMayAlias () Set mayAlias to Yes
withSamples (samples) Set samples to the description