UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderCompilerOutput Struct Reference

#include <ShaderCompilerCore.h>

Public Member Functions

 FShaderCompilerOutput ()
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS FShaderCompilerOutput (FShaderCompilerOutput &&)=default
 
 FShaderCompilerOutput (const FShaderCompilerOutput &)=default
 
FShaderCompilerOutputoperator= (FShaderCompilerOutput &&)=default
 
FShaderCompilerOutputoperator= (const FShaderCompilerOutput &)=default
 
 UE_DEPRECATED (5.6, "Use symbols accessors (GetSymbolWriteAccess, GetSymbolReadView) on FShaderCode object instead (ShaderCode member)") TArray< uint8 > PlatformDebugData
 
RENDERCORE_API void GenerateOutputHash ()
 
RENDERCORE_API void CompressOutput (FName ShaderCompressionFormat, FOodleDataCompression::ECompressor OodleCompressor, FOodleDataCompression::ECompressionLevel OodleLevel)
 
RENDERCORE_API void SerializeShaderCodeValidation ()
 
RENDERCORE_API void SerializeShaderDiagnosticData ()
 
template<typename TValue >
void AddStatistic (const TCHAR *Name, TValue Value, FGenericShaderStat::EFlags Flags=FGenericShaderStat::EFlags::None, FName TagName=NAME_None)
 
const FShaderCodeResourceGetFinalizedCodeResource () const
 
void SetCodeFromResource (FShaderCodeResource &&Resource)
 

Public Attributes

FShaderParameterMap ParameterMap
 
TArray< FShaderCompilerErrorErrors
 
FShaderTarget Target
 
FShaderCode ShaderCode
 
FSHAHash OutputHash
 
FShaderCompilerInputHash ValidateInputHash
 
uint32 NumInstructions
 
uint32 NumTextureSamplers
 
double CompileTime
 
double PreprocessTime
 
bool bSucceeded
 
bool bSupportsQueryingUsedAttributes
 
bool bSerializeModifiedSource
 
bool bSerializingForCache
 
TArray< FString > UsedAttributes
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS TArray< FShaderCodeValidationStrideParametersStrideToValidate
 
TArray< FShaderCodeValidationTypeParametersSRVTypeToValidate
 
TArray< FShaderCodeValidationTypeParametersUAVTypeToValidate
 
TArray< FShaderCodeValidationUBSizeParametersUBSizeToValidate
 
TArray< FShaderDiagnosticDataShaderDiagnosticDatas
 
FString ModifiedShaderSource
 
FString ModifiedEntryPointName
 
TArray< FGenericShaderStatShaderStatistics
 

Friends

FArchiveoperator<< (FArchive &Ar, FShaderCompilerOutput &Output)
 

Detailed Description

The output of the shader compiler. Bump UE_SHADER_CACHE_VERSION and ShaderCompileWorkerOutputVersion if FShaderCompilerOutput changes

Constructor & Destructor Documentation

◆ FShaderCompilerOutput() [1/3]

FShaderCompilerOutput::FShaderCompilerOutput ( )
inline

◆ FShaderCompilerOutput() [2/3]

PRAGMA_DISABLE_DEPRECATION_WARNINGS FShaderCompilerOutput::FShaderCompilerOutput ( FShaderCompilerOutput &&  )
default

◆ FShaderCompilerOutput() [3/3]

FShaderCompilerOutput::FShaderCompilerOutput ( const FShaderCompilerOutput )
default

Member Function Documentation

◆ AddStatistic()

template<typename TValue >
void FShaderCompilerOutput::AddStatistic ( const TCHAR Name,
TValue  Value,
FGenericShaderStat::EFlags  Flags = FGenericShaderStat::EFlags::None,
FName  TagName = NAME_None 
)
inline

◆ CompressOutput()

void FShaderCompilerOutput::CompressOutput ( FName  ShaderCompressionFormat,
FOodleDataCompression::ECompressor  OodleCompressor,
FOodleDataCompression::ECompressionLevel  OodleLevel 
)

Calls GenerateOutputHash() before the compression, replaces FShaderCode with the compressed data (if compression result was smaller).

◆ GenerateOutputHash()

void FShaderCompilerOutput::GenerateOutputHash ( )

Generates OutputHash from the compiler output.

◆ GetFinalizedCodeResource()

const FShaderCodeResource & FShaderCompilerOutput::GetFinalizedCodeResource ( ) const
inline

◆ operator=() [1/2]

FShaderCompilerOutput & FShaderCompilerOutput::operator= ( const FShaderCompilerOutput )
default

◆ operator=() [2/2]

FShaderCompilerOutput & FShaderCompilerOutput::operator= ( FShaderCompilerOutput &&  )
default

◆ SerializeShaderCodeValidation()

void FShaderCompilerOutput::SerializeShaderCodeValidation ( )

Add optional data in ShaderCode to perform additional shader input validation at runtime

◆ SerializeShaderDiagnosticData()

void FShaderCompilerOutput::SerializeShaderDiagnosticData ( )

Add optional diagnostic data in ShaderCode to perform assert translation at runtime

◆ SetCodeFromResource()

void FShaderCompilerOutput::SetCodeFromResource ( FShaderCodeResource &&  Resource)
inline

◆ UE_DEPRECATED()

FShaderCompilerOutput::UE_DEPRECATED ( 5.  6,
"Use symbols accessors (GetSymbolWriteAccess, GetSymbolReadView) on FShaderCode object instead (ShaderCode member)"   
)

Friends And Related Symbol Documentation

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FShaderCompilerOutput Output 
)
friend

Member Data Documentation

◆ bSerializeModifiedSource

bool FShaderCompilerOutput::bSerializeModifiedSource

◆ bSerializingForCache

bool FShaderCompilerOutput::bSerializingForCache

◆ bSucceeded

bool FShaderCompilerOutput::bSucceeded

◆ bSupportsQueryingUsedAttributes

bool FShaderCompilerOutput::bSupportsQueryingUsedAttributes

◆ CompileTime

double FShaderCompilerOutput::CompileTime

◆ Errors

TArray<FShaderCompilerError> FShaderCompilerOutput::Errors

◆ ModifiedEntryPointName

FString FShaderCompilerOutput::ModifiedEntryPointName

Use this field to store the entry point name if it's modified as part of the shader format's compilation process. This field is only currently required for shader formats which implement the independent preprocessing API And should only be set when compilation requires a different entry point than was set on the FShaderCompilerInput struct.

◆ ModifiedShaderSource

FString FShaderCompilerOutput::ModifiedShaderSource

Use this field to store the shader source code if it's modified as part of the shader format's compilation process. This should only be set when additional manipulation of source code is required that is not part of the implementation of PreprocessShader. This version of the source, if set, will be what is written as part of the debug dumps of preprocessed source, as well as used for upstream code which explicitly requests the final source code for other purposes (i.e. when ExtraSettings.bExtractShaderSource is set on the FShaderCompilerInput struct)

◆ NumInstructions

uint32 FShaderCompilerOutput::NumInstructions

◆ NumTextureSamplers

uint32 FShaderCompilerOutput::NumTextureSamplers

◆ OutputHash

FSHAHash FShaderCompilerOutput::OutputHash

◆ ParameterMap

FShaderParameterMap FShaderCompilerOutput::ParameterMap

◆ ParametersSRVTypeToValidate

TArray<FShaderCodeValidationType> FShaderCompilerOutput::ParametersSRVTypeToValidate

◆ ParametersStrideToValidate

PRAGMA_ENABLE_DEPRECATION_WARNINGS TArray<FShaderCodeValidationStride> FShaderCompilerOutput::ParametersStrideToValidate

◆ ParametersUAVTypeToValidate

TArray<FShaderCodeValidationType> FShaderCompilerOutput::ParametersUAVTypeToValidate

◆ ParametersUBSizeToValidate

TArray<FShaderCodeValidationUBSize> FShaderCompilerOutput::ParametersUBSizeToValidate

◆ PreprocessTime

double FShaderCompilerOutput::PreprocessTime

◆ ShaderCode

FShaderCode FShaderCompilerOutput::ShaderCode

◆ ShaderDiagnosticDatas

TArray<FShaderDiagnosticData> FShaderCompilerOutput::ShaderDiagnosticDatas

◆ ShaderStatistics

TArray<FGenericShaderStat> FShaderCompilerOutput::ShaderStatistics

◆ Target

FShaderTarget FShaderCompilerOutput::Target

◆ UsedAttributes

TArray<FString> FShaderCompilerOutput::UsedAttributes

◆ ValidateInputHash

FShaderCompilerInputHash FShaderCompilerOutput::ValidateInputHash

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