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).

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:

  1. Only enable it (set to non-zero) when you want to limit texture memory usage to available GPU memory.
  2. Consider the performance implications, as limiting texture pool size might affect visual quality or streaming performance.
  3. Test thoroughly in non-editor builds, as the setting doesn’t apply in the editor.
  4. Use in conjunction with other texture streaming settings for optimal performance.

Regarding the associated variable CVarStreamingLimitPoolSizeToVRAM:

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseScalability.ini:562, section: [TextureQuality@0]

Location: <Workspace>/Engine/Config/BaseScalability.ini:573, section: [TextureQuality@1]

Location: <Workspace>/Engine/Config/BaseScalability.ini:584, section: [TextureQuality@2]

Location: <Workspace>/Engine/Config/BaseScalability.ini:595, section: [TextureQuality@3]

Location: <Workspace>/Engine/Config/BaseScalability.ini:606, section: [TextureQuality@Cine]

#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());