ShaderCompilerCoreCountThreshold
ShaderCompilerCoreCountThreshold
#Overview
name: ShaderCompilerCoreCountThreshold
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 1
C++ source file.
#Summary
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1956, section: [DevOptions.Shaders]
- INI Section:
DevOptions.Shaders
- Raw value:
12
- Is Array:
False
#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:5867
Scope (from outer to inner):
file
function void FShaderCompilingManager::CalculateNumberOfCompilingThreads
Source code excerpt:
verify(GConfig->GetInt(TEXT("DevOptions.Shaders"), TEXT("NumUnusedShaderCompilingThreadsDuringGame"), NumUnusedShaderCompilingThreadsDuringGame, GEngineIni));
int32 ShaderCompilerCoreCountThreshold;
verify(GConfig->GetInt(TEXT("DevOptions.Shaders"), TEXT("ShaderCompilerCoreCountThreshold"), ShaderCompilerCoreCountThreshold, GEngineIni));
bool bForceUseSCWMemoryPressureLimits = false;
GConfig->GetBool(TEXT("DevOptions.Shaders"), TEXT("bForceUseSCWMemoryPressureLimits"), bForceUseSCWMemoryPressureLimits, GEngineIni);
// Don't reserve threads based on a percentage if we are in a commandlet or on a low core machine.
// In these scenarios we should try to use as many threads as possible.
if (!IsRunningCommandlet() && !GIsBuildMachine && NumVirtualCores > ShaderCompilerCoreCountThreshold)
{
// Reserve a percentage of the threads for general background work.
float PercentageUnusedShaderCompilingThreads;
verify(GConfig->GetFloat(TEXT("DevOptions.Shaders"), TEXT("PercentageUnusedShaderCompilingThreads"), PercentageUnusedShaderCompilingThreads, GEngineIni));
// ensure we get a valid multiplier.