UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderCompileJob Class Reference

#include <ShaderCompilerJobTypes.h>

+ Inheritance diagram for FShaderCompileJob:

Public Member Functions

virtual RENDERCORE_API FShaderCompilerInputHash GetInputHash () override
 
RENDERCORE_API void SerializeOutput (FShaderCacheSerializeContext &Ctx, int32 CodeIndex)
 
virtual void SerializeOutput (FShaderCacheSerializeContext &Ctx)
 
virtual void OnComplete () override
 
virtual RENDERCORE_API void OnComplete (FShaderDebugDataContext &Ctx) override
 
virtual RENDERCORE_API void AppendDebugName (FStringBuilderBase &OutName) const override
 
RENDERCORE_API void SerializeWorkerOutput (FArchive &Ar)
 
RENDERCORE_API void SerializeWorkerInput (FArchive &Ar)
 
void SerializeWorkerInputNoSource (FArchive &Ar)
 
RENDERCORE_API void SerializeArtifact (FArchive &Ar)
 
RENDERCORE_API FStringView GetFinalSourceView () const
 
virtual RENDERCORE_API void AppendDiagnostics (FString &OutDiagnostics, int32 InJobIndex, int32 InNumJobs, const TCHAR *Indentation=nullptr) const override final
 
 FShaderCompileJob ()
 
 FShaderCompileJob (uint32 InHash, uint32 InId, EShaderCompileJobPriority InPriroity, const FShaderCompileJobKey &InKey)
 
- Public Member Functions inherited from FShaderCommonCompileJob
void UpdateInputHash ()
 
void UpdateStatus (EShaderCompileJobStatus NewStatus)
 
uint32 AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 
FShaderCompileJobGetSingleShaderJob ()
 
const FShaderCompileJobGetSingleShaderJob () const
 
FShaderPipelineCompileJobGetShaderPipelineJob ()
 
const FShaderPipelineCompileJobGetShaderPipelineJob () const
 
bool Equals (const FShaderCommonCompileJob &Rhs) const
 
void ForEachSingleShaderJob (const TFunction< void(const FShaderCompileJob &SingleJob)> &Predicate) const
 
void ForEachSingleShaderJob (const TFunction< void(FShaderCompileJob &SingleJob)> &Predicate)
 

Public Attributes

FShaderCompileJobKey Key
 
TSharedPtr< const FShaderType::FParameters, ESPMode::ThreadSafeShaderParameters
 
FShaderCompilerInput Input
 
FShaderPreprocessOutput PreprocessOutput
 
TUniquePtr< FShaderPreprocessOutputSecondaryPreprocessOutput {}
 
FShaderCompilerOutput Output
 
TUniquePtr< FShaderCompilerOutputSecondaryOutput {}
 
TMap< const FVertexFactoryType *, TArray< const FShaderPipelineType * > > SharingPipelines
 
- Public Attributes inherited from FShaderCommonCompileJob
FShaderCommonCompileJobNextLink = nullptr
 
FShaderCommonCompileJob ** PrevLink = nullptr
 
FPendingShaderMapCompileResultsPtr PendingShaderMap
 
FThreadSafeCounter NumRefs
 
int32 JobIndex
 
uint32 Hash
 
uint32 Id
 
EShaderCompileJobType Type
 
EShaderCompileJobPriority Priority
 
EShaderCompileJobPriority PendingPriority
 
EShaderCompilerWorkerType CurrentWorker
 
TPimplPtr< UE::DerivedData::FRequestOwner > RequestOwner
 
uint8 bFinalized: 1
 
uint8 bSucceeded: 1
 
uint8 bErrorsAreLikelyToBeCode: 1
 
uint8 bReleased: 1
 
uint8 bInputHashSet: 1
 
uint8 bIsDefaultMaterial: 1
 
uint8 bIsGlobalShader: 1
 
uint8 bBypassCache: 1
 
FShaderCompilerInputHash InputHash
 
double TimeAddedToPendingQueue = 0.0
 
double TimeAssignedToExecution = 0.0
 
double TimeExecutionCompleted = 0.0
 
double TimeTaskSubmitJobs = 0.0
 
double TimeTaskSubmitJobsStall = 0.0
 
FShaderJobCacheRef JobCacheRef
 
TSharedPtr< FShaderCompileJobStatusJobStatusPtr
 

Static Public Attributes

static const EShaderCompileJobType Type = EShaderCompileJobType::Single
 

Additional Inherited Members

- Static Public Member Functions inherited from FShaderCommonCompileJob
static RENDERCORE_API uint32 GetNextJobId ()
 
- Protected Member Functions inherited from FShaderCommonCompileJob
 FShaderCommonCompileJob (EShaderCompileJobType InType, uint32 InHash, uint32 InId, EShaderCompileJobPriority InPriority)
 
virtual ~FShaderCommonCompileJob ()
 

Detailed Description

Stores all of the input and output information used to compile a single shader.

Constructor & Destructor Documentation

◆ FShaderCompileJob() [1/2]

FShaderCompileJob::FShaderCompileJob ( )
inline

◆ FShaderCompileJob() [2/2]

FShaderCompileJob::FShaderCompileJob ( uint32  InHash,
uint32  InId,
EShaderCompileJobPriority  InPriroity,
const FShaderCompileJobKey InKey 
)
inline

Member Function Documentation

◆ AppendDebugName()

void FShaderCompileJob::AppendDebugName ( FStringBuilderBase OutName) const
overridevirtual

◆ AppendDiagnostics()

void FShaderCompileJob::AppendDiagnostics ( FString &  OutDiagnostics,
int32  InJobIndex,
int32  InNumJobs,
const TCHAR Indentation = nullptr 
) const
finaloverridevirtual

Generates a diagnostics string for this compile job suitable for the output log.

Implements FShaderCommonCompileJob.

◆ GetFinalSourceView()

FStringView FShaderCompileJob::GetFinalSourceView ( ) const

◆ GetInputHash()

FShaderCompilerInputHash FShaderCompileJob::GetInputHash ( )
overridevirtual

Returns hash of all inputs for this job (needed for caching).

Reimplemented from FShaderCommonCompileJob.

◆ OnComplete() [1/2]

virtual void FShaderCompileJob::OnComplete ( )
inlineoverridevirtual

◆ OnComplete() [2/2]

void FShaderCompileJob::OnComplete ( FShaderDebugDataContext Ctx)
overridevirtual

◆ SerializeArtifact()

void FShaderCompileJob::SerializeArtifact ( FArchive Ar)

◆ SerializeOutput() [1/2]

virtual void FShaderCompileJob::SerializeOutput ( FShaderCacheSerializeContext Ctx)
inlinevirtual

Serializes (and deserializes) the output for caching purposes.

Reimplemented from FShaderCommonCompileJob.

◆ SerializeOutput() [2/2]

void FShaderCompileJob::SerializeOutput ( FShaderCacheSerializeContext Ctx,
int32  CodeIndex 
)

◆ SerializeWorkerInput()

void FShaderCompileJob::SerializeWorkerInput ( FArchive Ar)

◆ SerializeWorkerInputNoSource()

void FShaderCompileJob::SerializeWorkerInputNoSource ( FArchive Ar)

◆ SerializeWorkerOutput()

void FShaderCompileJob::SerializeWorkerOutput ( FArchive Ar)

Member Data Documentation

◆ Input

FShaderCompilerInput FShaderCompileJob::Input

Input for the shader compile

◆ Key

FShaderCompileJobKey FShaderCompileJob::Key

◆ Output

FShaderCompilerOutput FShaderCompileJob::Output

◆ PreprocessOutput

FShaderPreprocessOutput FShaderCompileJob::PreprocessOutput

◆ SecondaryOutput

TUniquePtr<FShaderCompilerOutput> FShaderCompileJob::SecondaryOutput {}

◆ SecondaryPreprocessOutput

TUniquePtr<FShaderPreprocessOutput> FShaderCompileJob::SecondaryPreprocessOutput {}

◆ ShaderParameters

TSharedPtr<const FShaderType::FParameters, ESPMode::ThreadSafe> FShaderCompileJob::ShaderParameters

Additional parameters that can be supplied to the compile job such that it is available from the compilation begins to when the FShader is created.

◆ SharingPipelines

TMap<const FVertexFactoryType*, TArray<const FShaderPipelineType*> > FShaderCompileJob::SharingPipelines

◆ Type

const EShaderCompileJobType FShaderCompileJob::Type = EShaderCompileJobType::Single
static

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