|
KarmaEngine
Game Engine for practical learning and research purposes
|
Template definition of FVulkanAttachmentReference with specializations done later. More...
#include <VulkanRenderPass.h>
Public Member Functions | |
| FVulkanAttachmentReference (const VkAttachmentReference &AttachmentReferenceIn, VkImageAspectFlags AspectMask) | |
| Constructor to copy from VkAttachmentReference. | |
| void | SetAttachment (const VkAttachmentReference &AttachmentReferenceIn, VkImageAspectFlags AspectMask) |
| Disable method enforced here (checkNoEntry()). | |
| void | SetAttachment (const FVulkanAttachmentReference< TAttachmentReferenceType > &AttachmentReferenceIn, VkImageAspectFlags AspectMask) |
| Template definition of SetAttachment (specialized out-of-class definition exists). | |
| void | SetDepthStencilAttachment (const VkAttachmentReference &AttachmentReferenceIn, const VkAttachmentReferenceStencilLayout *StencilReference, VkImageAspectFlags AspectMask, bool bSupportsParallelRendering) |
| Disable method enforced here (checkNoEntry()). | |
| void | ZeroStruct () |
| Template definition for zero initialization. Specialized out-of-class definition exists. | |
| void | SetAttachment (const VkAttachmentReference &AttachmentReferenceIn, VkImageAspectFlags AspectMask) |
| This is template specialization out-of-class definition triggered by m_ColorAttachmentReferences.Add(TAttachmentReferenceClass(RTLayout.GetColorAttachmentReferences()[ColorAttachment], 0));. | |
| void | SetDepthStencilAttachment (const VkAttachmentReference &AttachmentReferenceIn, const VkAttachmentReferenceStencilLayout *StencilReference, VkImageAspectFlags AspectMask, bool bSupportsParallelRendering) |
| This is template specialization out-of-class definition triggered by m_DepthStencilAttachmentReference.SetDepthStencilAttachment. | |
| void | ZeroStruct () |
| Template specialization out-of-class definition for zero initialization. | |
Template definition of FVulkanAttachmentReference with specializations done later.
This is primary struct template for attachment references like color, depth, and input attachments
See VkRenderPass CreateVulkanRenderPass() { .. FVulkanRenderPassBuilder<.., FVulkanAttachmentReference<VkAttachmentReference>, ..> Creator(InDevice); Creator.Create(RTLayout); .. }
where FVulkanRenderPassBuilder::m_ColorAttachmentReferences and FVulkanRenderPassBuilder::m_DepthStencilAttachmentReference are called
m_ColorAttachmentReferences.Add(TAttachmentReferenceClass(RTLayout.GetColorAttachmentReferences()[ColorAttachment], 0)); m_DepthStencilAttachmentReference.SetDepthStencilAttachment
triggering class template specializations out-of-class definitions of SetAttachment and SetDepthStencilAttachment
|
inline |
Constructor to copy from VkAttachmentReference.
|
inline |
Template definition of SetAttachment (specialized out-of-class definition exists).
|
inline |
This is template specialization out-of-class definition triggered by m_ColorAttachmentReferences.Add(TAttachmentReferenceClass(RTLayout.GetColorAttachmentReferences()[ColorAttachment], 0));.
|
inline |
Disable method enforced here (checkNoEntry()).
This "poison" is to ensure correct use (or trap the misuse) at call site
❌ Input attachments: mutation blocked (checkNoEntry()) FVulkanAttachmentReference<VkInputAttachmentReference> inputRef;
inputRef.SetAttachment(...); // Asserts/crashes - prevents bugs
✅ Color/depth attachments: mutation allowed FVulkanAttachmentReference<VkAttachmentReference> colorRef;
colorRef.SetAttachment(ref, mask); // Copies attachment/layout safely
This selectively enables mutation only for standard attachments. Or this discourages certain uses
|
inline |
This is template specialization out-of-class definition triggered by m_DepthStencilAttachmentReference.SetDepthStencilAttachment.
|
inline |
Disable method enforced here (checkNoEntry()).
This is to prevent misuse for non-depth-stencil attachments
|
inline |
Template specialization out-of-class definition for zero initialization.
This function is triggered by FVulkanAttachmentReference constructor
|
inline |
Template definition for zero initialization. Specialized out-of-class definition exists.