UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMetalBaseShader< BaseResourceType, ShaderType > Class Template Reference

#include <MetalBaseShader.h>

+ Inheritance diagram for TMetalBaseShader< BaseResourceType, ShaderType >:

Public Types

enum  { StaticFrequency = ShaderType }
 

Public Member Functions

 TMetalBaseShader (FMetalDevice &MetalDevice)
 
virtual ~TMetalBaseShader ()
 
void Init (TArrayView< const uint8 > InCode, FMetalCodeHeader &Header, MTLLibraryPtr InLibrary)
 
void Destroy ()
 
NS::String * GetSourceCode ()
 

Protected Member Functions

MTLFunctionPtr GetCompiledFunction (bool const bAsync=false, const int32 FunctionIndex=-1)
 

Protected Attributes

FMetalDeviceDevice
 

Additional Inherited Members

- Public Attributes inherited from FMetalShaderData
FMetalShaderBindings Bindings
 
TMap< uint32, MTL::ArgumentEncoder * > ArgumentEncoders
 
TMap< uint32, TBitArray<> > ArgumentBitmasks
 
TArray< FUniformBufferStaticSlotStaticSlots
 
int32 SideTableBinding = -1
 
uint32 SourceLen = 0
 
uint32 SourceCRC = 0
 
uint32 ConstantValueHash = 0
 
MTLFunctionPtr Function
 
MTLLibraryPtr Library
 
NS::String * GlslCodeNSString = nullptr
 
TArray< uint8CompressedSource
 
uint32 CodeSize = 0
 
bool bHasFunctionConstants = false
 
bool bDeviceFunctionConstants = false
 
uint32 LibraryFunctionIndex = -1
 

Member Enumeration Documentation

◆ anonymous enum

template<typename BaseResourceType , int32 ShaderType>
anonymous enum
Enumerator
StaticFrequency 

Constructor & Destructor Documentation

◆ TMetalBaseShader()

template<typename BaseResourceType , int32 ShaderType>
TMetalBaseShader< BaseResourceType, ShaderType >::TMetalBaseShader ( FMetalDevice MetalDevice)
inline

◆ ~TMetalBaseShader()

template<typename BaseResourceType , int32 ShaderType>
virtual TMetalBaseShader< BaseResourceType, ShaderType >::~TMetalBaseShader ( )
inlinevirtual

Member Function Documentation

◆ Destroy()

template<typename BaseResourceType , int32 ShaderType>
void TMetalBaseShader< BaseResourceType, ShaderType >::Destroy ( )

◆ GetCompiledFunction()

template<typename BaseResourceType , int32 ShaderType>
MTLFunctionPtr TMetalBaseShader< BaseResourceType, ShaderType >::GetCompiledFunction ( bool const  bAsync = false,
const int32  FunctionIndex = -1 
)
protected

◆ GetSourceCode()

template<typename BaseResourceType , int32 ShaderType>
NS::String * TMetalBaseShader< BaseResourceType, ShaderType >::GetSourceCode ( )
inline

Gets the Metal source code as an NSString if available or nullptr if not. Note that this will dynamically decompress from compressed data on first invocation.

◆ Init()

template<typename BaseResourceType , int32 ShaderType>
void TMetalBaseShader< BaseResourceType, ShaderType >::Init ( TArrayView< const uint8 InCode,
FMetalCodeHeader Header,
MTLLibraryPtr  InLibrary 
)

Member Data Documentation

◆ Device

template<typename BaseResourceType , int32 ShaderType>
FMetalDevice& TMetalBaseShader< BaseResourceType, ShaderType >::Device
protected

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