r.Streaming.LimitPoolSizeToVRAM
r.Streaming.LimitPoolSizeToVRAM
#Overview
name: r.Streaming.LimitPoolSizeToVRAM
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If non-zero, texture pool size with be limited to how much GPU mem is available.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.LimitPoolSizeToVRAM is to control whether the texture pool size should be limited to the available GPU memory. This setting variable is primarily used for texture streaming optimization in Unreal Engine’s rendering system.
The Unreal Engine subsystem that relies on this setting variable is the texture streaming system, which is part of the engine’s rendering module. This can be inferred from the file location (TextureStreamingHelpers.cpp) and the variable’s name, which includes “Streaming.”
The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of 0, meaning the feature is disabled by default. Developers can change this value at runtime using console commands or through configuration files.
This variable interacts with the associated variable CVarStreamingLimitPoolSizeToVRAM, which is the actual console variable object. They share the same value and purpose.
Developers must be aware that this setting only takes effect when the engine is not running in editor mode (as indicated by the condition !GIsEditor in the code). Also, the variable is marked with ECVF_Scalability, suggesting it’s part of the engine’s scalability settings.
Best practices when using this variable include:
- Only enable it (set to non-zero) when you want to limit texture memory usage to available GPU memory.
- Consider the performance implications, as limiting texture pool size might affect visual quality or streaming performance.
- Test thoroughly in non-editor builds, as the setting doesn’t apply in the editor.
- Use in conjunction with other texture streaming settings for optimal performance.
Regarding the associated variable CVarStreamingLimitPoolSizeToVRAM:
- Its purpose is the same as r.Streaming.LimitPoolSizeToVRAM, serving as the actual console variable object.
- It’s used in the FRenderAssetStreamingSettings::Update() function to update the bLimitPoolSizeToVRAM flag.
- The value is retrieved using GetValueOnAnyThread(), suggesting it can be accessed from multiple threads.
- Developers should be aware that changes to this variable will affect the engine’s texture streaming behavior, potentially impacting performance and memory usage.
- Best practices include using the r.Streaming.LimitPoolSizeToVRAM console command to modify this value rather than directly manipulating the CVarStreamingLimitPoolSizeToVRAM object.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:562, section: [TextureQuality@0]
- INI Section:
TextureQuality@0
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:573, section: [TextureQuality@1]
- INI Section:
TextureQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:584, section: [TextureQuality@2]
- INI Section:
TextureQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:595, section: [TextureQuality@3]
- INI Section:
TextureQuality@3
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:606, section: [TextureQuality@Cine]
- INI Section:
TextureQuality@Cine
- Raw value:
0
- 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/Streaming/TextureStreamingHelpers.cpp:206
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarStreamingLimitPoolSizeToVRAM(
TEXT("r.Streaming.LimitPoolSizeToVRAM"),
0,
TEXT("If non-zero, texture pool size with be limited to how much GPU mem is available."),
ECVF_Scalability);
TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus(
TEXT("r.Streaming.CheckBuildStatus"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingLimitPoolSizeToVRAM
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:205
Scope: file
Source code excerpt:
ECVF_Default);
TAutoConsoleVariable<int32> CVarStreamingLimitPoolSizeToVRAM(
TEXT("r.Streaming.LimitPoolSizeToVRAM"),
0,
TEXT("If non-zero, texture pool size with be limited to how much GPU mem is available."),
ECVF_Scalability);
TAutoConsoleVariable<int32> CVarStreamingCheckBuildStatus(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:315
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
bUsePerTextureBias = CVarStreamingUsePerTextureBias.GetValueOnAnyThread() != 0;
bUseNewMetrics = CVarStreamingUseNewMetrics.GetValueOnAnyThread() != 0;
bLimitPoolSizeToVRAM = !GIsEditor && CVarStreamingLimitPoolSizeToVRAM.GetValueOnAnyThread() != 0;
bFullyLoadUsedTextures = CVarStreamingFullyLoadUsedTextures.GetValueOnAnyThread() != 0;
bFullyLoadMeshes = CVarStreamingFullyLoadMeshes.GetValueOnAnyThread() != 0;
bUseAllMips = CVarStreamingUseAllMips.GetValueOnAnyThread() != 0;
MinMipForSplitRequest = CVarStreamingMinMipForSplitRequest.GetValueOnAnyThread();
PerTextureBiasViewBoostThreshold = CVarStreamingPerTextureBiasViewBoostThreshold.GetValueOnAnyThread();
MaxHiddenPrimitiveViewBoost = FMath::Max<float>(1.f, CVarStreamingMaxHiddenPrimitiveViewBoost.GetValueOnAnyThread());