Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | Public Attributes | List of all members
AZ::RPI::PassAttachment Struct Referencefinal

Describes an attachment to be used by a Pass. More...

#include <PassAttachment.h>

Inherits intrusive_refcount< AZStd::atomic_uint, AZStd::intrusive_default_delete >.

Public Member Functions

 AZ_CLASS_ALLOCATOR (PassAttachment, SystemAllocator, 0)
 
 PassAttachment (const PassImageAttachmentDesc &attachmentDesc)
 
 PassAttachment (const PassBufferAttachmentDesc &attachmentDesc)
 
Ptr< PassAttachmentClone () const
 
RHI::AttachmentId GetAttachmentId () const
 Returns the AttachmentId used to bind the attachment with the RHI.
 
RHI::AttachmentType GetAttachmentType () const
 Returns the type of this attachment (image, buffer)
 
void ComputePathName (const Name &passPath)
 Takes the path of the owning pass, concatenates it with name and stores the path.
 
const RHI::TransientImageDescriptor GetTransientImageDescriptor () const
 Creates a TransientImageDescriptor from the image descriptor. Only use this if the attachment type is Image.
 
const RHI::TransientBufferDescriptor GetTransientBufferDescriptor () const
 Creates a TransientBufferDescriptor from the buffer descriptor. Only use this if the attachment type is Buffer.
 
void Update (bool updateImportedAttachments=false)
 
void ValidateDeviceFormats (const AZStd::vector< RHI::Format > &formatFallbacks, RHI::FormatCapabilities capabilities=RHI::FormatCapabilities::None)
 Sets all formats to nearest device supported formats and warns if changes where made.
 
void OnAttached (const PassAttachmentBinding &binding)
 Called when a PassAttachmentBinding sets it's attachment to this.
 

Public Attributes

Name m_name
 Name of the attachment.
 
RHI::AttachmentId m_path
 
RHI::UnifiedAttachmentDescriptor m_descriptor
 A descriptor of the attachment image.
 
RHI::AttachmentLifetimeType m_lifetime = RHI::AttachmentLifetimeType::Transient
 Whether the attachment is transient or not.
 
const PassAttachmentBindingm_formatSource = nullptr
 
const PassAttachmentBindingm_multisampleSource = nullptr
 
const PassAttachmentBindingm_sizeSource = nullptr
 
PassAttachmentSizeMultipliers m_sizeMultipliers
 Multiply source size by these values to obtain new size.
 
const PassAttachmentBindingm_arraySizeSource = nullptr
 
RenderPipelinem_renderPipelineSource = nullptr
 The render pipeline to use when querying render source settings for size, format, multisample state, etc.
 
bool m_generateFullMipChain = false
 
Data::Instance< Data::InstanceData > m_importedResource
 The resource's instance of this attachment if the attachment is imported (which m_lifetime is Imported)
 
Passm_ownerPass = nullptr
 Reference to owner pass.
 
union {
   struct {
      u8   m_getSizeFromPipeline: 1
 
      u8   m_getFormatFromPipeline: 1
 
      u8   m_getMultisampleStateFromPipeline: 1
 
   } 
 
   u8   m_allFlags = 0
 
}; 
 Collection of flags that influence how source data is queried.
 

Detailed Description

Describes an attachment to be used by a Pass.

Member Function Documentation

◆ Update()

void AZ::RPI::PassAttachment::Update ( bool  updateImportedAttachments = false)

Updates the size and format of this attachment using the sources below if specified

Parameters
updateImportedAttachments- Imported attchments will only update if this is true.

Member Data Documentation

◆ m_arraySizeSource

const PassAttachmentBinding* AZ::RPI::PassAttachment::m_arraySizeSource = nullptr

The source attachment from which to derive this attachment's array size If null, keep this attachment's array size as is

◆ m_formatSource

const PassAttachmentBinding* AZ::RPI::PassAttachment::m_formatSource = nullptr

The source attachment from which to derive this attachment's format If null, keep this attachment's format as is

◆ m_generateFullMipChain

bool AZ::RPI::PassAttachment::m_generateFullMipChain = false

Whether to auto generate the number of mips based on the attachment so that we get a full mip chain with the smallest mip being 1x1 in size

◆ m_multisampleSource

const PassAttachmentBinding* AZ::RPI::PassAttachment::m_multisampleSource = nullptr

The source attachment from which to derive this attachment's multi-sample state If null, keep this attachment's multi-sample state as is

◆ m_path

RHI::AttachmentId AZ::RPI::PassAttachment::m_path

Path of the attachment (path of the owning pass + name) This is the Id used to bind the attachment with the RHI

◆ m_sizeSource

const PassAttachmentBinding* AZ::RPI::PassAttachment::m_sizeSource = nullptr

The source attachment from which to derive this attachment's size If null, keep this attachment's size as is


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