UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ShaderCompilerJobCache.cpp File Reference
#include "ShaderCompilerPrivate.h"
#include "DerivedDataCache.h"
#include "DerivedDataRequestOwner.h"
#include "Math/UnitConversion.h"
#include "Misc/FileHelper.h"
#include "ODSC/ODSCManager.h"
#include "ProfilingDebugging/CookStats.h"
#include "ProfilingDebugging/DiagnosticTable.h"
#include "ProfilingDebugging/LoadTimeTracker.h"
#include "ProfilingDebugging/StallDetector.h"
#include "Serialization/MemoryReader.h"
#include "Serialization/MemoryWriter.h"
#include "ShaderSerialization.h"

Classes

class  FShaderCommonCompileJobIterator
 
struct  FShaderJobData
 
struct  FShaderJobDataBlock
 
class  FShaderJobDataMap
 
struct  FShaderJobCacheStoredOutput
 
class  FShaderCompilerJobTable
 
class  FShaderJobCache
 

Namespaces

namespace  ShaderCompiler
 

Macros

#define UE_SHADERCACHE_LOG_LEVEL   VeryVerbose
 
#define UE_SHADERCOMPILER_FIFO_JOB_EXECUTION   1
 

Functions

 TRACE_DECLARE_ATOMIC_INT_COUNTER (Shaders_JobCacheSearchAttempts, TEXT("Shaders/JobCache/SearchAttempts"))
 
 TRACE_DECLARE_ATOMIC_INT_COUNTER (Shaders_JobCacheHits, TEXT("Shaders/JobCache/Hits"))
 
 TRACE_DECLARE_ATOMIC_INT_COUNTER (Shaders_JobCacheDDCRequests, TEXT("Shaders/JobCache/DDCRequests"))
 
 TRACE_DECLARE_ATOMIC_INT_COUNTER (Shaders_JobCacheDDCHits, TEXT("Shaders/JobCache/DDCHits"))
 
 TRACE_DECLARE_ATOMIC_MEMORY_COUNTER (Shaders_JobCacheDDCBytesReceived, TEXT("Shaders/JobCache/DDCBytesRecieved"))
 
 TRACE_DECLARE_ATOMIC_MEMORY_COUNTER (Shaders_JobCacheDDCBytesSent, TEXT("Shaders/JobCache/DDCBytesSent"))
 
bool ShaderCompiler::IsJobCacheDebugValidateEnabled ()
 
bool IsShaderJobCacheDDCEnabled ()
 
bool IsMaterialMapDDCEnabled ()
 
bool ShouldCompileODSCOnlyShaders ()
 

Variables

int32 GShaderCompilerMaxJobCacheMemoryPercent = 5
 
int32 GShaderCompilerMaxJobCacheMemoryMB = 16LL * 1024LL
 
int32 GShaderCompilerPerShaderDDCGlobal = 1
 
int32 GShaderCompilerDebugStallSubmitJob = 0
 
int32 GShaderCompilerJobCacheOverflowReducePercent = 80
 
int32 GShaderCompilerDebugStallDDCQuery = 0
 
int32 GShaderCompilerDebugDiscardCacheOutputs = 0
 

Macro Definition Documentation

◆ UE_SHADERCACHE_LOG_LEVEL

#define UE_SHADERCACHE_LOG_LEVEL   VeryVerbose

◆ UE_SHADERCOMPILER_FIFO_JOB_EXECUTION

#define UE_SHADERCOMPILER_FIFO_JOB_EXECUTION   1

Function Documentation

◆ IsMaterialMapDDCEnabled()

bool IsMaterialMapDDCEnabled ( )

◆ IsShaderJobCacheDDCEnabled()

bool IsShaderJobCacheDDCEnabled ( )

◆ ShouldCompileODSCOnlyShaders()

bool ShouldCompileODSCOnlyShaders ( )

Returns true if we should compile shaders that are only compiled in on demand shader compilation modes and not stored in cooked shader maps. This can be useful for debug shaders.

◆ TRACE_DECLARE_ATOMIC_INT_COUNTER() [1/4]

TRACE_DECLARE_ATOMIC_INT_COUNTER ( Shaders_JobCacheDDCHits  ,
TEXT("Shaders/JobCache/DDCHits"  
)

◆ TRACE_DECLARE_ATOMIC_INT_COUNTER() [2/4]

TRACE_DECLARE_ATOMIC_INT_COUNTER ( Shaders_JobCacheDDCRequests  ,
TEXT("Shaders/JobCache/DDCRequests"  
)

◆ TRACE_DECLARE_ATOMIC_INT_COUNTER() [3/4]

TRACE_DECLARE_ATOMIC_INT_COUNTER ( Shaders_JobCacheHits  ,
TEXT("Shaders/JobCache/Hits"  
)

◆ TRACE_DECLARE_ATOMIC_INT_COUNTER() [4/4]

TRACE_DECLARE_ATOMIC_INT_COUNTER ( Shaders_JobCacheSearchAttempts  ,
TEXT("Shaders/JobCache/SearchAttempts"  
)

◆ TRACE_DECLARE_ATOMIC_MEMORY_COUNTER() [1/2]

TRACE_DECLARE_ATOMIC_MEMORY_COUNTER ( Shaders_JobCacheDDCBytesReceived  ,
TEXT("Shaders/JobCache/DDCBytesRecieved"  
)

◆ TRACE_DECLARE_ATOMIC_MEMORY_COUNTER() [2/2]

TRACE_DECLARE_ATOMIC_MEMORY_COUNTER ( Shaders_JobCacheDDCBytesSent  ,
TEXT("Shaders/JobCache/DDCBytesSent"  
)

Variable Documentation

◆ GShaderCompilerDebugDiscardCacheOutputs

int32 GShaderCompilerDebugDiscardCacheOutputs = 0

◆ GShaderCompilerDebugStallDDCQuery

int32 GShaderCompilerDebugStallDDCQuery = 0

◆ GShaderCompilerDebugStallSubmitJob

int32 GShaderCompilerDebugStallSubmitJob = 0

◆ GShaderCompilerJobCacheOverflowReducePercent

int32 GShaderCompilerJobCacheOverflowReducePercent = 80

◆ GShaderCompilerMaxJobCacheMemoryMB

int32 GShaderCompilerMaxJobCacheMemoryMB = 16LL * 1024LL

◆ GShaderCompilerMaxJobCacheMemoryPercent

int32 GShaderCompilerMaxJobCacheMemoryPercent = 5

◆ GShaderCompilerPerShaderDDCGlobal

int32 GShaderCompilerPerShaderDDCGlobal = 1