Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::FrameGraphAttachmentDatabase Class Reference

Public Member Functions

void Clear ()
 Clears the database back to an empty state.
 
ResultCode ImportImage (const AttachmentId &attachmentId, Ptr< Image > image)
 Imports an image into the database.
 
ResultCode ImportSwapChain (const AttachmentId &attachmentId, Ptr< SwapChain > swapChain)
 Imports a swapchain into the database.
 
ResultCode ImportBuffer (const AttachmentId &attachmentId, Ptr< Buffer > buffer)
 Imports a buffer into the database.
 
ResultCode CreateTransientImage (const TransientImageDescriptor &descriptor)
 Creates a transient image and inserts it into the database.
 
ResultCode CreateTransientBuffer (const TransientBufferDescriptor &descriptor)
 Creates a transient buffer and inserts it into the database.
 
ImageDescriptor GetImageDescriptor (const AttachmentId &attachmentId) const
 Finds the attachment associated with.
 
BufferDescriptor GetBufferDescriptor (const AttachmentId &attachmentId) const
 Finds the attachment associated with.
 
bool IsAttachmentValid (const AttachmentId &attachmentId) const
 Returns whether the attachment exists in the database.
 
const FrameAttachmentFindAttachment (const AttachmentId &attachmentId) const
 Finds an attachment associated with.
 
FrameAttachmentFindAttachment (const AttachmentId &attachmentId)
 
template<typename AttachmentType >
const AttachmentType * FindAttachment (const AttachmentId &attachmentId) const
 
template<typename AttachmentType >
AttachmentType * FindAttachment (const AttachmentId &attachmentId)
 
const AZStd::vector< FrameAttachment * > & GetAttachments () const
 Returns the full list of attachments.
 
const AZStd::vector< ImageFrameAttachment * > & GetImageAttachments () const
 Returns the full list of image attachments.
 
const AZStd::vector< BufferFrameAttachment * > & GetBufferAttachments () const
 Returns the full list of buffer attachments.
 
const AZStd::vector< SwapChainFrameAttachment * > & GetSwapChainAttachments () const
 Returns the transient swap chain attachments registered in the graph.
 
const AZStd::vector< ImageFrameAttachment * > & GetImportedImageAttachments () const
 Returns the imported image attachments registered in the graph.
 
const AZStd::vector< BufferFrameAttachment * > & GetImportedBufferAttachments () const
 Returns the imported buffer attachments registered in the graph.
 
const AZStd::vector< ImageFrameAttachment * > & GetTransientImageAttachments () const
 Returns the transient image attachments registered in the graph.
 
const AZStd::vector< BufferFrameAttachment * > & GetTransientBufferAttachments () const
 Returns the transient buffer attachments registered in the graph.
 
const ScopeAttachmentPtrList * FindScopeAttachmentList (const ScopeId &scopeId, const AttachmentId &attachmentId) const
 Finds the list of scope attachments used by a scope for the given attachment.
 
const ScopeAttachmentFindScopeAttachment (const ScopeId &scopeId, const AttachmentId &attachmentId) const
 Finds the scope attachment used by a scope for the given attachment.
 
const ScopeAttachmentFindScopeAttachment (const ScopeId &scopeId, const AttachmentId &attachmentId, const ImageViewDescriptor &imageViewDescriptor, const RHI::ScopeAttachmentUsage attachmentUsage) const
 
const ScopeAttachmentFindScopeAttachment (const ScopeId &scopeId, const AttachmentId &attachmentId, const RHI::ScopeAttachmentUsage attachmentUsage) const
 
const ScopeAttachmentPtrList & GetScopeAttachments () const
 Returns the full list of scope attachments.
 
template<typename ScopeAttachmentType , typename... Args>
ScopeAttachmentType * EmplaceScopeAttachment (Scope &scope, FrameAttachment &attachment, Args &&... arguments)
 
ScopeId EmplaceResourcePoolUse (ResourcePool &pool, ScopeId scopeId)
 

Member Function Documentation

◆ EmplaceResourcePoolUse()

ScopeId AZ::RHI::FrameGraphAttachmentDatabase::EmplaceResourcePoolUse ( ResourcePool pool,
ScopeId  scopeId 
)

Emplaces a use of a resource pool by a specific scope. Returns the ScopeId of the most recent use of the pool or en empty ScopeId if this is the first use.

◆ FindAttachment() [1/2]

const FrameAttachment * AZ::RHI::FrameGraphAttachmentDatabase::FindAttachment ( const AttachmentId &  attachmentId) const

Finds an attachment associated with.

Parameters
attachmentId.

◆ FindAttachment() [2/2]

template<typename AttachmentType >
const AttachmentType * AZ::RHI::FrameGraphAttachmentDatabase::FindAttachment ( const AttachmentId &  attachmentId) const

Finds an attachment associated with

Parameters
attachmentIdand attempts to cast to the requested type. Will return null if the type is not compatible, or the attachment was not found.

◆ FindScopeAttachment() [1/2]

const ScopeAttachment * AZ::RHI::FrameGraphAttachmentDatabase::FindScopeAttachment ( const ScopeId &  scopeId,
const AttachmentId &  attachmentId,
const ImageViewDescriptor imageViewDescriptor,
const RHI::ScopeAttachmentUsage  attachmentUsage 
) const

Finds the scope attachment used by a scope for the given attachment. If multiple scope image attachments are used for the same attachment, provide ScopeAttachmentUsage (in case attachments are merged) and ImageViewDescriptor (in case the attachments are different based on view, i.e different mips or aspect of a texture) to ensure that the correct scope attachment is returned.

◆ FindScopeAttachment() [2/2]

const ScopeAttachment * AZ::RHI::FrameGraphAttachmentDatabase::FindScopeAttachment ( const ScopeId &  scopeId,
const AttachmentId &  attachmentId,
const RHI::ScopeAttachmentUsage  attachmentUsage 
) const

Finds the scope attachment used by a scope for the given attachment. If multiple scope attachments are used for the same attachment provide attachmentUsage to ensure that the correct scope attachment is returned

◆ GetBufferDescriptor()

BufferDescriptor AZ::RHI::FrameGraphAttachmentDatabase::GetBufferDescriptor ( const AttachmentId &  attachmentId) const

Finds the attachment associated with.

Parameters
attachmentIdand returns its buffer descriptor.

◆ GetImageDescriptor()

ImageDescriptor AZ::RHI::FrameGraphAttachmentDatabase::GetImageDescriptor ( const AttachmentId &  attachmentId) const

Finds the attachment associated with.

Parameters
attachmentIdand returns its image descriptor.

The documentation for this class was generated from the following file: