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::RPI::ShaderResourceGroupPool Class Referencefinal

#include <ShaderResourceGroupPool.h>

Inherits AZ::Data::InstanceData.

Public Member Functions

 AZ_INSTANCE_DATA (ShaderResourceGroupPool, "{D75561AF-C10A-41BC-BABF-63DBFA160388}")
 
 AZ_CLASS_ALLOCATOR (ShaderResourceGroupPool, AZ::SystemAllocator)
 
RHI::Ptr< RHI::ShaderResourceGroupCreateRHIShaderResourceGroup ()
 
RHI::ShaderResourceGroupPoolGetRHIPool ()
 
const RHI::ShaderResourceGroupPoolGetRHIPool () const
 

Static Public Member Functions

static Data::Instance< ShaderResourceGroupPoolFindOrCreate (const Data::Asset< ShaderAsset > &shaderAsset, const SupervariantIndex &supervariantIndex, const AZ::Name &srgName)
 

Friends

class ShaderSystem
 

Detailed Description

Wraps a RHI ShaderResourceGroupPool for use in the RPI to initialize ShaderResourceGroups.

This class is a bit unusual in that InstanceData objects usually associate with an AssetData class of corresponding type (for example, Material and MaterialAsset). In this case, the ShaderResourceGroupPool instance corresponds to a specific ShaderResourceGroupAsset, not a ShaderResourceGroup[Pool]Asset. This is because there is a 1:1 relationship with ShaderResourceGroupAsset's ShaderResourceGroupLayout and no additional configuration data is needed for the pool.

User code should not need to access this pool directly; RPI::ShaderResourceGroup uses it internally.

Member Function Documentation

◆ FindOrCreate()

static Data::Instance< ShaderResourceGroupPool > AZ::RPI::ShaderResourceGroupPool::FindOrCreate ( const Data::Asset< ShaderAsset > &  shaderAsset,
const SupervariantIndex supervariantIndex,
const AZ::Name &  srgName 
)
static

Instantiates or returns an existing runtime pool for a given ShaderResourceGroup.

Parameters
shaderResourceGroupPoolAssetThe asset used to instantiate an instance of the streaming image pool.

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