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

#include <ShaderCompiler.h>

+ Inheritance diagram for FShaderCompileThreadRunnable:

Public Member Functions

 FShaderCompileThreadRunnable (class FShaderCompilingManager *InManager)
 
virtual ~FShaderCompileThreadRunnable ()
 
virtual EShaderCompilerWorkerType GetWorkerType () const override final
 
- Public Member Functions inherited from FShaderCompileThreadRunnableBase
 FShaderCompileThreadRunnableBase (class FShaderCompilingManager *InManager)
 
virtual ~FShaderCompileThreadRunnableBase ()
 
void SetPriorityRange (EShaderCompileJobPriority MinPriority, EShaderCompileJobPriority MaxPriority)
 
void StartThread ()
 
virtual void Stop ()
 
virtual uint32 Run ()
 
void WaitForCompletion () const
 
- Public Member Functions inherited from FRunnable
virtual bool Init ()
 
virtual void Exit ()
 
virtual class FSingleThreadRunnableGetSingleThreadInterface ()
 
virtual ~FRunnable ()
 

Protected Member Functions

virtual bool PrintWorkerMemoryUsage (bool bAllowToWaitForLock=true) override
 
virtual FShaderCompileMemoryUsage GetExternalWorkerMemoryUsage () override
 
- Protected Member Functions inherited from FShaderCompileThreadRunnableBase
virtual const TCHARGetThreadName () const
 
bool WorkerStateHeartbeat (uint64 InWorkerStateHash)
 

Friends

class FShaderCompilingManager
 

Additional Inherited Members

- Protected Attributes inherited from FShaderCompileThreadRunnableBase
class FShaderCompilingManagerManager
 
FRunnableThreadThread
 
int32 MinPriorityIndex
 
int32 MaxPriorityIndex
 
TAtomic< boolbForceFinish
 

Detailed Description

Shader compiling thread This runs in the background while UE is running, launches shader compile worker processes when necessary, and feeds them inputs and reads back the outputs.

Constructor & Destructor Documentation

◆ FShaderCompileThreadRunnable()

FShaderCompileThreadRunnable::FShaderCompileThreadRunnable ( class FShaderCompilingManager InManager)

Initialization constructor.

◆ ~FShaderCompileThreadRunnable()

FShaderCompileThreadRunnable::~FShaderCompileThreadRunnable ( )
virtual

Member Function Documentation

◆ GetExternalWorkerMemoryUsage()

FShaderCompileMemoryUsage FShaderCompileThreadRunnable::GetExternalWorkerMemoryUsage ( )
overrideprotectedvirtual

Returns the amount of memory (in bytes) used by external processes related to this, if any.

Reimplemented from FShaderCompileThreadRunnableBase.

◆ GetWorkerType()

virtual EShaderCompilerWorkerType FShaderCompileThreadRunnable::GetWorkerType ( ) const
inlinefinaloverridevirtual

Returns the type of shader workers this thread represents.

Implements FShaderCompileThreadRunnableBase.

◆ PrintWorkerMemoryUsage()

bool FShaderCompileThreadRunnable::PrintWorkerMemoryUsage ( bool  bAllowToWaitForLock = true)
overrideprotectedvirtual

Tries to print out the memory usage of all shader compile workers. When called during an out-of-memory event, it is useful to allow this process to wait for any locks, so we can rule out deadlocks while reporting out-of-memory errors. Returns whether the memory usage was successfully printed.

Reimplemented from FShaderCompileThreadRunnableBase.

Friends And Related Symbol Documentation

◆ FShaderCompilingManager


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