r.Streaming.StressTest.FramesForFullUpdate
r.Streaming.StressTest.FramesForFullUpdate
#Overview
name: r.Streaming.StressTest.FramesForFullUpdate
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Num frames to update texture states when doing the stress tests.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.StressTest.FramesForFullUpdate is to control the number of frames required to update texture states during streaming stress tests in Unreal Engine 5.
This setting variable is primarily used by the texture streaming system, which is part of the Engine module. It’s specifically utilized in stress testing scenarios for the streaming system.
The value of this variable is set through a console variable (CVar) declaration in the Engine module’s texture streaming helpers. It’s initialized with a default value of 1 but can be changed at runtime through console commands or programmatically.
The variable interacts closely with other stress test-related variables and settings within the texture streaming system. It’s directly associated with the C++ variable CVarStreamingStressTestFramesForFullUpdate, which is used to access its value in the code.
Developers must be aware that this variable is marked with ECVF_Cheat flag, indicating it’s intended for testing and debugging purposes, not for use in shipping builds. It should only be modified in controlled testing environments.
Best practices when using this variable include:
- Only use it for stress testing the texture streaming system.
- Be cautious about setting very high values, as it could significantly impact performance during tests.
- Use in conjunction with other streaming stress test variables for comprehensive testing.
- Reset to default values after testing to ensure normal operation.
Regarding the associated variable CVarStreamingStressTestFramesForFullUpdate:
This is the actual C++ variable that holds the value of the r.Streaming.StressTest.FramesForFullUpdate setting. It’s defined as a TAutoConsoleVariable
The purpose of this variable is to provide a programmatic interface to the r.Streaming.StressTest.FramesForFullUpdate setting. It’s used directly in the FRenderAssetStreamingSettings::Update function to set the FramesForFullUpdate value when stress testing is enabled.
Developers should be aware that changes to this variable will immediately affect the behavior of the streaming stress test. It’s accessed using the GetValueOnAnyThread() method, which means it can be safely read from any thread.
Best practices for using CVarStreamingStressTestFramesForFullUpdate include:
- Use it for reading the current value of the stress test setting in C++ code.
- Avoid direct modification of this variable; instead, change the value through the console variable system.
- Consider the threading implications when accessing this variable, although GetValueOnAnyThread() provides thread-safe access.
#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:293
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarStreamingStressTestFramesForFullUpdate(
TEXT("r.Streaming.StressTest.FramesForFullUpdate"),
1,
TEXT("Num frames to update texture states when doing the stress tests."),
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingVRAMPercentageClamp(
TEXT("r.Streaming.PoolSize.VRAMPercentageClamp"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingStressTestFramesForFullUpdate
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:292
Scope: file
Source code excerpt:
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingStressTestFramesForFullUpdate(
TEXT("r.Streaming.StressTest.FramesForFullUpdate"),
1,
TEXT("Num frames to update texture states when doing the stress tests."),
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingVRAMPercentageClamp(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:349
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
bStressTest = true;
// Increase threading stress between the gamethread update and the async task.
FramesForFullUpdate = FMath::Max<int32>(CVarStreamingStressTestFramesForFullUpdate.GetValueOnAnyThread(), 0);
// This will create cancelation requests.
DropMips = 2;
// Increase chances of canceling IO while they are not yet completed.
ExtraIOLatency = CVarStreamingStressTestExtraIOLatency.GetValueOnAnyThread();
}
else