r.VT.ParallelFeedbackTasks
r.VT.ParallelFeedbackTasks
#Overview
name: r.VT.ParallelFeedbackTasks
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Use worker threads for virtual texture feedback tasks.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.VT.ParallelFeedbackTasks is to control the use of worker threads for virtual texture feedback tasks in Unreal Engine’s rendering system. This setting variable is part of the Virtual Texturing (VT) system, which is a crucial component of Unreal Engine’s rendering pipeline.
The Unreal Engine subsystem that relies on this setting variable is the Renderer module, specifically the Virtual Texture System. This can be seen from the file path where the variable is defined: Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined as a TAutoConsoleVariable with a default value of 0, which means parallel feedback tasks are disabled by default.
This variable interacts with CVarVTParallelFeedbackTasks, which is the associated console variable. They share the same value and purpose.
Developers must be aware that enabling this variable (setting it to a non-zero value) will cause the engine to use worker threads for virtual texture feedback tasks. This can potentially improve performance by parallelizing these tasks, but it may also introduce additional complexity and potential synchronization issues.
Best practices when using this variable include:
- Testing thoroughly when enabling parallel feedback tasks to ensure it doesn’t introduce any rendering artifacts or performance issues.
- Monitoring performance metrics to determine if enabling this feature actually improves performance in your specific use case.
- Being cautious when modifying this setting in shipping builds, as it could potentially introduce unexpected behavior.
Regarding the associated variable CVarVTParallelFeedbackTasks:
The purpose of CVarVTParallelFeedbackTasks is identical to r.VT.ParallelFeedbackTasks. It’s the actual console variable that controls the behavior, while r.VT.ParallelFeedbackTasks is the string used to reference it in console commands or config files.
This variable is used in the FVirtualTextureUpdateSettings struct to set the bParallelFeedbackTasks member, which likely controls the behavior of the Virtual Texture System with regards to parallel feedback tasks.
The value of this variable is typically set through the console or configuration files, but it can also be queried and set programmatically using the GetValueOnRenderThread() method.
Developers should be aware that changes to this variable will only take effect on the render thread, as indicated by the ECVF_RenderThreadSafe flag used when defining the console variable.
Best practices for using CVarVTParallelFeedbackTasks are the same as those for r.VT.ParallelFeedbackTasks, as they are effectively the same setting.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:86
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarVTParallelFeedbackTasks(
TEXT("r.VT.ParallelFeedbackTasks"),
0,
TEXT("Use worker threads for virtual texture feedback tasks."),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTNumFeedbackTasks(
TEXT("r.VT.NumFeedbackTasks"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarVTParallelFeedbackTasks
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:85
Scope: file
Source code excerpt:
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTParallelFeedbackTasks(
TEXT("r.VT.ParallelFeedbackTasks"),
0,
TEXT("Use worker threads for virtual texture feedback tasks."),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTNumFeedbackTasks(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:170
Scope (from outer to inner):
file
function FVirtualTextureUpdateSettings::FVirtualTextureUpdateSettings
Source code excerpt:
bEnablePlayback = CVarVTEnablePlayback.GetValueOnRenderThread() != 0;
bForceContinuousUpdate = CVarVTForceContinuousUpdate.GetValueOnRenderThread() != 0;
bParallelFeedbackTasks = CVarVTParallelFeedbackTasks.GetValueOnRenderThread() != 0;
NumFeedbackTasks = CVarVTNumFeedbackTasks.GetValueOnRenderThread();
NumGatherTasks = CVarVTNumGatherTasks.GetValueOnRenderThread();
MaxGatherPagesBeforeFlush = CVarVTPageUpdateFlushCount.GetValueOnRenderThread();
MaxRVTPageUploads = VirtualTextureScalability::GetMaxUploadsPerFrame();
MaxSVTPageUploads = VirtualTextureScalability::GetMaxUploadsPerFrameForStreamingVT();
MaxPagesProduced = VirtualTextureScalability::GetMaxPagesProducedPerFrame();