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::PipelineLayoutDescriptor Class Reference

#include <PipelineLayoutDescriptor.h>

Inherits AZStd::intrusive_base.

Inherited by AZ::DX12::PipelineLayoutDescriptor, AZ::Metal::PipelineLayoutDescriptor, and AZ::Null::PipelineLayoutDescriptor.

Public Member Functions

 AZ_RTTI (PipelineLayoutDescriptor, "{F2901A0F-9700-49E9-A266-55DCF1E39CF9}")
 
 AZ_CLASS_ALLOCATOR (PipelineLayoutDescriptor, AZ::SystemAllocator)
 
bool IsFinalized () const
 
void Reset ()
 Resets the descriptor back to an empty state.
 
void AddShaderResourceGroupLayoutInfo (const ShaderResourceGroupLayout &layout, const ShaderResourceGroupBindingInfo &shaderResourceGroupInfo)
 Adds the layout info of shader resource group, ordered by frequency of update.
 
void SetRootConstantsLayout (const ConstantsLayout &rootConstantsLayout)
 Sets the layout of inline constants.
 
RHI::ResultCode Finalize ()
 
size_t GetShaderResourceGroupLayoutCount () const
 Returns the number of shader resource group layouts added to this pipeline layout.
 
const ShaderResourceGroupLayoutGetShaderResourceGroupLayout (size_t index) const
 Returns the shader resource group layout pointer at the requested index.
 
const ShaderResourceGroupBindingInfoGetShaderResourceGroupBindingInfo (size_t index) const
 Returns the shader resource group binding info at the requested index.
 
const ConstantsLayoutGetRootConstantsLayout () const
 Returns the inline constants layout.
 
HashValue64 GetHash () const
 Returns the hash computed for the pipeline layout.
 
uint32_t GetShaderResourceGroupIndexFromBindingSlot (uint32_t bindingSlot) const
 Converts from an SRG binding slot to a shader resource group index.
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static RHI::Ptr< PipelineLayoutDescriptorCreate ()
 

Friends

template<typename , typename >
struct AnyTypeInfoConcept
 
template<typename , bool , bool >
struct Serialize::InstanceFactory
 

Detailed Description

This class describes shader bindings to the RHI platform backend when creating a PipelineState. The base class contains a ShaderResourceGroupLayout table ordered by frequency of update. The platform descriptor implementation augments this table with low-level shader binding information.

In short, if the shader compiler needs to communicate platform-specific shader binding information when constructing a pipeline state, this is the place to do it. Platforms are expected to override this class in their PLATFORM.Reflect library, which is then exposed to the offline shader compiler.

Member Function Documentation

◆ Finalize()

RHI::ResultCode AZ::RHI::PipelineLayoutDescriptor::Finalize ( )

Finalizes the descriptor for use. Must be called prior to serialization. Should not be called after serialization.


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