UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderCommonCompileJob Class Referenceabstract

#include <ShaderCompilerJobTypes.h>

+ Inheritance diagram for FShaderCommonCompileJob:

Public Member Functions

void UpdateInputHash ()
 
void UpdateStatus (EShaderCompileJobStatus NewStatus)
 
uint32 AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 
virtual FShaderCompilerInputHash GetInputHash ()
 
virtual void SerializeOutput (FShaderCacheSerializeContext &Ctx)
 
virtual void AppendDiagnostics (FString &OutDiagnostics, int32 InJobIndex, int32 InNumJobs, const TCHAR *Indentation=nullptr) const =0
 
FShaderCompileJobGetSingleShaderJob ()
 
const FShaderCompileJobGetSingleShaderJob () const
 
FShaderPipelineCompileJobGetShaderPipelineJob ()
 
const FShaderPipelineCompileJobGetShaderPipelineJob () const
 
virtual void OnComplete ()=0
 
virtual void OnComplete (FShaderDebugDataContext &Ctx)=0
 
virtual void AppendDebugName (FStringBuilderBase &OutName) const =0
 
bool Equals (const FShaderCommonCompileJob &Rhs) const
 
void ForEachSingleShaderJob (const TFunction< void(const FShaderCompileJob &SingleJob)> &Predicate) const
 
void ForEachSingleShaderJob (const TFunction< void(FShaderCompileJob &SingleJob)> &Predicate)
 

Static Public Member Functions

static RENDERCORE_API uint32 GetNextJobId ()
 

Public Attributes

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
 

Protected Member Functions

 FShaderCommonCompileJob (EShaderCompileJobType InType, uint32 InHash, uint32 InId, EShaderCompileJobPriority InPriority)
 
virtual ~FShaderCommonCompileJob ()
 

Friends

class FShaderCompilingManager
 
class FShaderPipelineCompileJob
 

Detailed Description

Stores all of the common information used to compile a shader or pipeline.

Constructor & Destructor Documentation

◆ FShaderCommonCompileJob()

FShaderCommonCompileJob::FShaderCommonCompileJob ( EShaderCompileJobType  InType,
uint32  InHash,
uint32  InId,
EShaderCompileJobPriority  InPriority 
)
inlineprotected

◆ ~FShaderCommonCompileJob()

virtual FShaderCommonCompileJob::~FShaderCommonCompileJob ( )
inlineprotectedvirtual

Member Function Documentation

◆ AddRef()

uint32 FShaderCommonCompileJob::AddRef ( ) const
inline

◆ AppendDebugName()

virtual void FShaderCommonCompileJob::AppendDebugName ( FStringBuilderBase OutName) const
pure virtual

◆ AppendDiagnostics()

virtual void FShaderCommonCompileJob::AppendDiagnostics ( FString &  OutDiagnostics,
int32  InJobIndex,
int32  InNumJobs,
const TCHAR Indentation = nullptr 
) const
pure virtual

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

Implemented in FShaderCompileJob, and FShaderPipelineCompileJob.

◆ Equals()

bool FShaderCommonCompileJob::Equals ( const FShaderCommonCompileJob Rhs) const
inline

◆ ForEachSingleShaderJob() [1/2]

void FShaderCommonCompileJob::ForEachSingleShaderJob ( const TFunction< void(const FShaderCompileJob &SingleJob)> &  Predicate) const

Calls the specified predicate for each single compile job, i.e. FShaderCompileJob and each stage of FShaderPipelineCompileJob.

◆ ForEachSingleShaderJob() [2/2]

void FShaderCommonCompileJob::ForEachSingleShaderJob ( const TFunction< void(FShaderCompileJob &SingleJob)> &  Predicate)

◆ GetInputHash()

virtual FShaderCompilerInputHash FShaderCommonCompileJob::GetInputHash ( )
inlinevirtual

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

Reimplemented in FShaderCompileJob, and FShaderPipelineCompileJob.

◆ GetNextJobId()

uint32 FShaderCommonCompileJob::GetNextJobId ( )
static

This returns a unique id for a shader compiler job

◆ GetRefCount()

uint32 FShaderCommonCompileJob::GetRefCount ( ) const
inline

◆ GetShaderPipelineJob() [1/2]

FShaderPipelineCompileJob * FShaderCommonCompileJob::GetShaderPipelineJob ( )
inline

◆ GetShaderPipelineJob() [2/2]

const FShaderPipelineCompileJob * FShaderCommonCompileJob::GetShaderPipelineJob ( ) const
inline

◆ GetSingleShaderJob() [1/2]

FShaderCompileJob * FShaderCommonCompileJob::GetSingleShaderJob ( )
inline

◆ GetSingleShaderJob() [2/2]

const FShaderCompileJob * FShaderCommonCompileJob::GetSingleShaderJob ( ) const
inline

◆ OnComplete() [1/2]

virtual void FShaderCommonCompileJob::OnComplete ( )
pure virtual

◆ OnComplete() [2/2]

virtual void FShaderCommonCompileJob::OnComplete ( FShaderDebugDataContext Ctx)
pure virtual

◆ Release()

uint32 FShaderCommonCompileJob::Release ( ) const
inline

◆ SerializeOutput()

virtual void FShaderCommonCompileJob::SerializeOutput ( FShaderCacheSerializeContext Ctx)
inlinevirtual

Serializes (and deserializes) the output for caching purposes.

Reimplemented in FShaderCompileJob, and FShaderPipelineCompileJob.

◆ UpdateInputHash()

void FShaderCommonCompileJob::UpdateInputHash ( )
inline

◆ UpdateStatus()

void FShaderCommonCompileJob::UpdateStatus ( EShaderCompileJobStatus  NewStatus)
inline

Friends And Related Symbol Documentation

◆ FShaderCompilingManager

◆ FShaderPipelineCompileJob

Member Data Documentation

◆ bBypassCache

uint8 FShaderCommonCompileJob::bBypassCache

Whether or not to bypass the job/ddc caches when executing this job

◆ bErrorsAreLikelyToBeCode

uint8 FShaderCommonCompileJob::bErrorsAreLikelyToBeCode

◆ bFinalized

uint8 FShaderCommonCompileJob::bFinalized

true if the results of the shader compile have been processed.

◆ bInputHashSet

uint8 FShaderCommonCompileJob::bInputHashSet

Whether we hashed the inputs

◆ bIsDefaultMaterial

uint8 FShaderCommonCompileJob::bIsDefaultMaterial

Whether or not we are a default material.

◆ bIsGlobalShader

uint8 FShaderCommonCompileJob::bIsGlobalShader

Whether or not we are a global shader.

◆ bReleased

uint8 FShaderCommonCompileJob::bReleased

true if the results of the shader compile have been released from the FShaderCompilerManager. After a job is bFinalized it will be bReleased when ReleaseJob() is invoked, which means that the shader compile thread is no longer processing the job; which is useful for non standard job handling (Niagara as an example).

◆ bSucceeded

uint8 FShaderCommonCompileJob::bSucceeded

Output of the shader compile

◆ CurrentWorker

EShaderCompilerWorkerType FShaderCommonCompileJob::CurrentWorker

◆ Hash

uint32 FShaderCommonCompileJob::Hash

◆ Id

uint32 FShaderCommonCompileJob::Id

Id of the shader map this shader belongs to.

◆ InputHash

FShaderCompilerInputHash FShaderCommonCompileJob::InputHash

Hash of all the job inputs

◆ JobCacheRef

FShaderJobCacheRef FShaderCommonCompileJob::JobCacheRef

◆ JobIndex

int32 FShaderCommonCompileJob::JobIndex

◆ JobStatusPtr

TSharedPtr<FShaderCompileJobStatus> FShaderCommonCompileJob::JobStatusPtr

◆ NextLink

FShaderCommonCompileJob* FShaderCommonCompileJob::NextLink = nullptr

Linked list support – not using TIntrusiveLinkedList because we want lock free insertion not supported by the core class

◆ NumRefs

FThreadSafeCounter FShaderCommonCompileJob::NumRefs
mutable

◆ PendingPriority

EShaderCompileJobPriority FShaderCommonCompileJob::PendingPriority

◆ PendingShaderMap

FPendingShaderMapCompileResultsPtr FShaderCommonCompileJob::PendingShaderMap

◆ PrevLink

FShaderCommonCompileJob** FShaderCommonCompileJob::PrevLink = nullptr

◆ Priority

EShaderCompileJobPriority FShaderCommonCompileJob::Priority

◆ RequestOwner

TPimplPtr<UE::DerivedData::FRequestOwner> FShaderCommonCompileJob::RequestOwner

◆ TimeAddedToPendingQueue

double FShaderCommonCompileJob::TimeAddedToPendingQueue = 0.0

In-engine timestamp of being added to a pending queue. Not set for jobs that are satisfied from the jobs cache

◆ TimeAssignedToExecution

double FShaderCommonCompileJob::TimeAssignedToExecution = 0.0

In-engine timestamp of being assigned to a worker. Not set for jobs that are satisfied from the jobs cache

◆ TimeExecutionCompleted

double FShaderCommonCompileJob::TimeExecutionCompleted = 0.0

In-engine timestamp of job being completed. Encompasses the compile time. Not set for jobs that are satisfied from the jobs cache

◆ TimeTaskSubmitJobs

double FShaderCommonCompileJob::TimeTaskSubmitJobs = 0.0

Time spent in tasks generated in FShaderJobCache::SubmitJobs, plus stall time on mutex locks in those tasks

◆ TimeTaskSubmitJobsStall

double FShaderCommonCompileJob::TimeTaskSubmitJobsStall = 0.0

◆ Type

EShaderCompileJobType FShaderCommonCompileJob::Type

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