UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMetalShaderLibrary Class Referencefinal

#include <MetalShaderLibrary.h>

+ Inheritance diagram for FMetalShaderLibrary:

Classes

struct  FLazyMetalLib
 
struct  FShaderLibDataOwner
 

Public Types

using FShaderCodeArrayType = TArray< uint8 >
 

Public Member Functions

 FMetalShaderLibrary (FMetalDevice &Device, EShaderPlatform Platform, FString const &Name, const FString &InShaderLibraryFilename, const FMetalShaderLibraryHeader &InHeader, FSerializedShaderArchive &&InSerializedShaders, FShaderCodeArrayType &&InShaderCode, TArray< TUniquePtr< FLazyMetalLib > > &&InLazyLibraries)
 
virtual ~FMetalShaderLibrary ()
 
virtual bool IsNativeLibrary () const override final
 
virtual int32 GetNumShaders () const override
 
virtual int32 GetNumShaderMaps () const override
 
virtual uint32 GetSizeBytes () const override
 
virtual int32 GetNumShadersForShaderMap (int32 ShaderMapIndex) const override
 
virtual int32 GetShaderIndex (int32 ShaderMapIndex, int32 i) const override
 
virtual int32 FindShaderMapIndex (const FSHAHash &Hash) override
 
virtual int32 FindShaderIndex (const FSHAHash &Hash) override
 
virtual FSHAHash GetShaderHash (int32 ShaderMapIndex, int32 ShaderIndex) override
 
virtual FSHAHash GetShaderMapHash (int32 ShaderMapIndex) const override
 
virtual bool PreloadShader (int32 ShaderIndex, FGraphEventArray &OutCompletionEvents) override
 
virtual bool PreloadShaderMap (int32 ShaderMapIndex, FGraphEventArray &OutCompletionEvents) override
 
virtual TRefCountPtr< FRHIShaderCreateShader (int32 Index, bool bRequired=true) override
 
- Public Member Functions inherited from FRHIShaderLibrary
 FRHIShaderLibrary (EShaderPlatform InPlatform, FString const &InName)
 
virtual ~FRHIShaderLibrary ()
 
EShaderPlatform GetPlatform (void) const
 
const FString & GetName (void) const
 
uint32 GetId (void) const
 
virtual void GetAllShaderIndices (int32 ShaderMapIndex, TArray< int32 > &ShaderIndices)
 
virtual uint32 GetShaderSizeBytes (int32 ShaderIndex) const
 
virtual bool IsPreloading (int32 ShaderIndex, FGraphEventArray &OutCompletionEvents)
 
virtual bool PreloadShaderMap (int32 ShaderMapIndex, FCoreDelegates::FAttachShaderReadRequestFunc AttachShaderReadRequestFunc)
 
virtual void ReleasePreloadedShader (int32 ShaderIndex)
 
virtual void AddRefPreloadedShaderGroup (int32 ShaderGroupIndex)
 
virtual void ReleasePreloadedShaderGroup (int32 ShaderGroupIndex)
 
virtual int32 GetGroupIndexForShader (int32 ShaderIndex) const
 
virtual int32 GetLibraryId ()
 
virtual void Teardown ()
 
- Public Member Functions inherited from FRHIResource
RHI_API FRHIResource (ERHIResourceType InResourceType)
 
uint32 AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 
bool IsValid () const
 
void DisableLifetimeExtension ()
 
ERHIResourceType GetType () const
 
FName GetOwnerName () const
 
void SetOwnerName (FName InOwnerName)
 

Static Public Attributes

static FCriticalSection LoadedShaderLibraryMutex
 
static TMap< FString, FRHIShaderLibrary * > LoadedShaderLibraryMap
 

Additional Inherited Members

- Protected Member Functions inherited from FRHIResource
virtual RHI_API ~FRHIResource ()
 
- Protected Attributes inherited from FRHIShaderLibrary
EShaderPlatform Platform
 
FString LibraryName
 
uint32 LibraryId
 

Member Typedef Documentation

◆ FShaderCodeArrayType

Constructor & Destructor Documentation

◆ FMetalShaderLibrary()

FMetalShaderLibrary::FMetalShaderLibrary ( FMetalDevice Device,
EShaderPlatform  Platform,
FString const &  Name,
const FString &  InShaderLibraryFilename,
const FMetalShaderLibraryHeader InHeader,
FSerializedShaderArchive &&  InSerializedShaders,
FShaderCodeArrayType &&  InShaderCode,
TArray< TUniquePtr< FLazyMetalLib > > &&  InLazyLibraries 
)

◆ ~FMetalShaderLibrary()

FMetalShaderLibrary::~FMetalShaderLibrary ( )
virtual

Member Function Documentation

◆ CreateShader()

TRefCountPtr< FRHIShader > FMetalShaderLibrary::CreateShader ( int32  Index,
bool  bRequired = true 
)
overridevirtual

Reimplemented from FRHIShaderLibrary.

◆ FindShaderIndex()

int32 FMetalShaderLibrary::FindShaderIndex ( const FSHAHash Hash)
overridevirtual

Implements FRHIShaderLibrary.

◆ FindShaderMapIndex()

int32 FMetalShaderLibrary::FindShaderMapIndex ( const FSHAHash Hash)
overridevirtual

Implements FRHIShaderLibrary.

◆ GetNumShaderMaps()

int32 FMetalShaderLibrary::GetNumShaderMaps ( ) const
overridevirtual

Implements FRHIShaderLibrary.

◆ GetNumShaders()

int32 FMetalShaderLibrary::GetNumShaders ( ) const
overridevirtual

Implements FRHIShaderLibrary.

◆ GetNumShadersForShaderMap()

int32 FMetalShaderLibrary::GetNumShadersForShaderMap ( int32  ShaderMapIndex) const
overridevirtual

Implements FRHIShaderLibrary.

◆ GetShaderHash()

virtual FSHAHash FMetalShaderLibrary::GetShaderHash ( int32  ShaderMapIndex,
int32  ShaderIndex 
)
inlineoverridevirtual

Implements FRHIShaderLibrary.

◆ GetShaderIndex()

int32 FMetalShaderLibrary::GetShaderIndex ( int32  ShaderMapIndex,
int32  i 
) const
overridevirtual

Implements FRHIShaderLibrary.

◆ GetShaderMapHash()

virtual FSHAHash FMetalShaderLibrary::GetShaderMapHash ( int32  ShaderMapIndex) const
inlineoverridevirtual

Implements FRHIShaderLibrary.

◆ GetSizeBytes()

uint32 FMetalShaderLibrary::GetSizeBytes ( ) const
overridevirtual

Implements FRHIShaderLibrary.

◆ IsNativeLibrary()

bool FMetalShaderLibrary::IsNativeLibrary ( ) const
finaloverridevirtual

Implements FRHIShaderLibrary.

◆ PreloadShader()

virtual bool FMetalShaderLibrary::PreloadShader ( int32  ShaderIndex,
FGraphEventArray OutCompletionEvents 
)
inlineoverridevirtual

Reimplemented from FRHIShaderLibrary.

◆ PreloadShaderMap()

virtual bool FMetalShaderLibrary::PreloadShaderMap ( int32  ShaderMapIndex,
FGraphEventArray OutCompletionEvents 
)
inlineoverridevirtual

Reimplemented from FRHIShaderLibrary.

Member Data Documentation

◆ LoadedShaderLibraryMap

TMap< FString, FRHIShaderLibrary * > FMetalShaderLibrary::LoadedShaderLibraryMap
static

◆ LoadedShaderLibraryMutex

FCriticalSection FMetalShaderLibrary::LoadedShaderLibraryMutex
static

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