r.ShaderCompiler.JobCache
r.ShaderCompiler.JobCache
#Overview
name: r.ShaderCompiler.JobCache
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
if != 0, shader compiler cache (based on the unpreprocessed input hash) will be disabled. By default, it is enabled.
It is referenced in 2
C++ source files.
#Summary
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:97
Scope: file
Source code excerpt:
int32 GShaderCompilerJobCache = 1;
static FAutoConsoleVariableRef CVarShaderCompilerJobCache(
TEXT("r.ShaderCompiler.JobCache"),
GShaderCompilerJobCache,
TEXT("if != 0, shader compiler cache (based on the unpreprocessed input hash) will be disabled. By default, it is enabled."),
ECVF_Default
);
static TAutoConsoleVariable<bool> CVarShaderCompilerDebugValidateJobCache(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Materials/MaterialShader.cpp:1880
Scope (from outer to inner):
file
function int32 FMaterialShaderMap::SubmitCompileJobs
Source code excerpt:
// DebugExtension and Description make the jobs unnecessarily different. Use them if the job cache is disabled or shader dev mode is on
static IConsoleVariable* CVarCacheEnabled = IConsoleManager::Get().FindConsoleVariable(TEXT("r.ShaderCompiler.JobCache"));
static IConsoleVariable* CVarShaderDevMode = IConsoleManager::Get().FindConsoleVariable(TEXT("r.ShaderDevelopmentMode"));
if ((CVarCacheEnabled && CVarCacheEnabled->GetInt() == 0) || (CVarShaderDevMode && CVarShaderDevMode->GetInt() != 0))
{
DebugExtensionStr = FString::Printf(TEXT("_%08x%08x"), ShaderMapId.BaseMaterialId.A, ShaderMapId.BaseMaterialId.B);
DebugDescriptionStr = GetDebugDescription();
}