Describes an attachment to be used by a Pass. More...
#include <PassAttachment.h>
Inherits AZStd::intrusive_refcount< AZStd::atomic_uint, AZStd::intrusive_default_delete >.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (PassAttachment, SystemAllocator) | |
PassAttachment (const PassImageAttachmentDesc &attachmentDesc) | |
PassAttachment (const PassBufferAttachmentDesc &attachmentDesc) | |
Ptr< PassAttachment > | Clone () 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 PassAttachmentBinding * | m_formatSource = nullptr |
const PassAttachmentBinding * | m_multisampleSource = nullptr |
const PassAttachmentBinding * | m_sizeSource = nullptr |
PassAttachmentSizeMultipliers | m_sizeMultipliers |
Multiply source size by these values to obtain new size. | |
const PassAttachmentBinding * | m_arraySizeSource = nullptr |
RenderPipeline * | m_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) | |
Pass * | m_ownerPass = nullptr |
Reference to owner pass. | |
union { | |
struct { | |
u8 m_getSizeFromPipeline: 1 | |
u8 m_getFormatFromPipeline: 1 | |
u8 m_getMultisampleStateFromPipeline: 1 | |
u8 m_updatingImageFormat: 1 | |
u8 m_updatingMultisampleState: 1 | |
u8 m_updatingSize: 1 | |
u8 m_updatingArraySize: 1 | |
} | |
u8 m_allFlags = 0 | |
}; | |
Collection of flags that influence how source data is queried. | |
Protected Member Functions | |
void | UpdateImageFormat () |
void | UpdateImageMultisampleState () |
void | UpdateImageSize () |
void | UpdateImageArraySize () |
Describes an attachment to be used by a Pass.
void AZ::RPI::PassAttachment::Update | ( | bool | updateImportedAttachments = false | ) |
Updates the size and format of this attachment using the sources below if specified
updateImportedAttachments | - Imported attchments will only update if this is true. |
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
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
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
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
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
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