11/*
2- * Copyright 2019-2023 Diligent Graphics LLC
2+ * Copyright 2019-2025 Diligent Graphics LLC
33 * Copyright 2015-2019 Egor Yusov
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -63,6 +63,7 @@ DILIGENT_TYPED_ENUM(ATTACHMENT_LOAD_OP, Uint8)
6363 // / D3D12 counterpart: D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD.
6464 ATTACHMENT_LOAD_OP_DISCARD,
6565
66+ // / Special value indicating the number of load operations in the enumeration.
6667 ATTACHMENT_LOAD_OP_COUNT
6768};
6869
@@ -83,6 +84,7 @@ DILIGENT_TYPED_ENUM(ATTACHMENT_STORE_OP, Uint8)
8384 // / D3D12 counterpart: D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD.
8485 ATTACHMENT_STORE_OP_DISCARD,
8586
87+ // / Special value indicating the number of store operations in the enumeration.
8688 ATTACHMENT_STORE_OP_COUNT
8789};
8890
@@ -97,20 +99,28 @@ struct RenderPassAttachmentDesc
9799 // / The number of samples in the texture.
98100 Uint8 SampleCount DEFAULT_INITIALIZER (1 );
99101
100- // / Load operation that specifies how the contents of color and depth components of
102+ // / Load operation.
103+
104+ // / Specifies how the contents of color and depth components of
101105 // / the attachment are treated at the beginning of the subpass where it is first used.
102106 ATTACHMENT_LOAD_OP LoadOp DEFAULT_INITIALIZER (ATTACHMENT_LOAD_OP_LOAD);
103107
104- // / Store operation how the contents of color and depth components of the attachment
108+ // / Store operation.
109+
110+ // / Defines how the contents of color and depth components of the attachment
105111 // / are treated at the end of the subpass where it is last used.
106112 ATTACHMENT_STORE_OP StoreOp DEFAULT_INITIALIZER (ATTACHMENT_STORE_OP_STORE);
107113
108- // / Load operation that specifies how the contents of the stencil component of the
114+ // / Stencil load operation.
115+
116+ // / Specifies how the contents of the stencil component of the
109117 // / attachment is treated at the beginning of the subpass where it is first used.
110118 // / This value is ignored when the format does not have stencil component.
111119 ATTACHMENT_LOAD_OP StencilLoadOp DEFAULT_INITIALIZER (ATTACHMENT_LOAD_OP_LOAD);
112120
113- // / Store operation how the contents of the stencil component of the attachment
121+ // / Stencil store operation.
122+
123+ // / Defines how the contents of the stencil component of the attachment
114124 // / is treated at the end of the subpass where it is last used.
115125 // / This value is ignored when the format does not have stencil component.
116126 ATTACHMENT_STORE_OP StencilStoreOp DEFAULT_INITIALIZER (ATTACHMENT_STORE_OP_STORE);
@@ -152,11 +162,14 @@ typedef struct RenderPassAttachmentDesc RenderPassAttachmentDesc;
152162// / Special constant indicating that the render pass attachment is not used.
153163#define DILIGENT_ATTACHMENT_UNUSED 0xFFFFFFFFU
154164
165+ // / Special constant indicating that the render pass attachment is not used.
155166static DILIGENT_CONSTEXPR Uint32 ATTACHMENT_UNUSED = DILIGENT_ATTACHMENT_UNUSED;
156167
157168// / Attachment reference description.
158169struct AttachmentReference
159170{
171+ // / Attachment index in the render pass attachment array.
172+
160173 // / Either an integer value identifying an attachment at the corresponding index in RenderPassDesc::pAttachments,
161174 // / or ATTACHMENT_UNUSED to signify that this attachment is not used.
162175 Uint32 AttachmentIndex DEFAULT_INITIALIZER (0 );
@@ -201,6 +214,8 @@ struct ShadingRateAttachment
201214 // / Shading rate attachment reference, see Diligent::AttachmentReference.
202215 AttachmentReference Attachment DEFAULT_INITIALIZER ({});
203216
217+ // / The size of the shading rate tile in pixels.
218+
204219 // / Each texel in the attachment contains shading rate for the whole tile.
205220 // / The size must be a power-of-two value between ShadingRateProperties::MinTileSize and ShadingRateProperties::MaxTileSize.
206221 // / Keep zero to use the default tile size.
@@ -247,15 +262,15 @@ struct SubpassDesc
247262
248263 // / Pointer to the array of color render target attachments, see Diligent::AttachmentReference.
249264
250- // / Each element of the pRenderTargetAttachments array corresponds to an output in the pixel shader,
265+ // / Each element of the ` pRenderTargetAttachments` array corresponds to an output in the pixel shader,
251266 // / i.e. if the shader declares an output variable decorated with a render target index X, then it uses
252- // / the attachment provided in pRenderTargetAttachments[X]. If the attachment index is ATTACHMENT_UNUSED,
267+ // / the attachment provided in ` pRenderTargetAttachments[X]` . If the attachment index is ATTACHMENT_UNUSED,
253268 // / writes to this render target are ignored.
254269 const AttachmentReference* pRenderTargetAttachments DEFAULT_INITIALIZER (nullptr );
255270
256271 // / Pointer to the array of resolve attachments, see Diligent::AttachmentReference.
257272
258- // / If pResolveAttachments is not NULL, each of its elements corresponds to a render target attachment
273+ // / If ` pResolveAttachments` is not ` NULL` , each of its elements corresponds to a render target attachment
259274 // / (the element in pRenderTargetAttachments at the same index), and a multisample resolve operation is
260275 // / defined for each attachment. At the end of each subpass, multisample resolve operations read the subpass's
261276 // / color attachments, and resolve the samples for each pixel within the render area to the same pixel location
@@ -358,6 +373,7 @@ typedef struct SubpassDesc SubpassDesc;
358373// / Special subpass index value expanding synchronization scope outside a subpass.
359374#define DILIGENT_SUBPASS_EXTERNAL 0xFFFFFFFFU
360375
376+ // / Special subpass index value expanding synchronization scope outside a subpass.
361377static DILIGENT_CONSTEXPR Uint32 SUBPASS_EXTERNAL = DILIGENT_SUBPASS_EXTERNAL;
362378
363379// / Subpass dependency description
@@ -488,6 +504,7 @@ typedef struct RenderPassDesc RenderPassDesc;
488504class IRenderPass : public IDeviceObject
489505{
490506public:
507+ // / Returns the render pass description.
491508 virtual const RenderPassDesc& DILIGENT_CALL_TYPE GetDesc () const override = 0;
492509};
493510
0 commit comments