r.TSR.16BitVALU.Intel
r.TSR.16BitVALU.Intel
#Overview
name: r.TSR.16BitVALU.Intel
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Overrides whether to use 16bit VALU on Intel desktop GPUs
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.TSR.16BitVALU.Intel is to control whether to use 16-bit Vector Arithmetic Logic Unit (VALU) operations on Intel desktop GPUs when performing Temporal Super Resolution (TSR) in Unreal Engine 5.
This setting variable is primarily used by the rendering system, specifically in the Temporal Super Resolution module. The Unreal Engine subsystem that relies on this variable is the Renderer, as evidenced by its location in the “Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp” file.
The value of this variable is set through the TAutoConsoleVariable system, which allows it to be changed at runtime. It’s initialized with a default value of 1, meaning 16-bit VALU operations are enabled by default on Intel GPUs.
This variable interacts with similar variables for other GPU vendors, such as CVarTSR16BitVALUOnNvidia for NVIDIA GPUs. The code checks the GPU vendor and then uses the appropriate variable to determine whether to use 16-bit VALU operations.
Developers should be aware that this setting is specific to Intel desktop GPUs and may affect performance and image quality of Temporal Super Resolution. Changing this value could impact the balance between performance and precision in TSR calculations.
Best practices when using this variable include:
- Testing the impact on both performance and image quality when changing this setting.
- Considering the target hardware when deciding whether to modify this value.
- Being consistent with the approach across different GPU vendors for a uniform experience.
Regarding the associated variable CVarTSR16BitVALUOnIntel:
This is the actual ConsoleVariable object that corresponds to the r.TSR.16BitVALU.Intel setting. It’s used to store and retrieve the current value of the setting.
The purpose of CVarTSR16BitVALUOnIntel is to provide a programmatic interface to the r.TSR.16BitVALU.Intel setting within the engine’s code.
This variable is used in the Renderer subsystem, specifically in the Temporal Super Resolution implementation.
The value of this variable is set when the engine initializes the console variables, and it can be changed at runtime through console commands or code.
It interacts directly with the TSR system, influencing whether 16-bit VALU operations are used on Intel GPUs.
Developers should be aware that this is the actual object they would interact with in C++ code when they need to read or modify the r.TSR.16BitVALU.Intel setting programmatically.
Best practices for using this variable include:
- Using GetValueOnRenderThread() when accessing the value, as shown in the provided code snippet.
- Considering thread safety when modifying the value, as indicated by the ECVF_RenderThreadSafe flag.
- Using this variable in conjunction with checks for the GPU vendor to ensure correct behavior across different hardware.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:95
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnIntel(
TEXT("r.TSR.16BitVALU.Intel"), 1,
TEXT("Overrides whether to use 16bit VALU on Intel desktop GPUs"),
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnNvidia(
TEXT("r.TSR.16BitVALU.Nvidia"), 0,
TEXT("Overrides whether to use 16bit VALU on Nvidia desktop GPUs"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarTSR16BitVALUOnIntel
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:94
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnIntel(
TEXT("r.TSR.16BitVALU.Intel"), 1,
TEXT("Overrides whether to use 16bit VALU on Intel desktop GPUs"),
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnNvidia(
TEXT("r.TSR.16BitVALU.Nvidia"), 0,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:1287
Scope (from outer to inner):
file
function FDefaultTemporalUpscaler::FOutputs AddTemporalSuperResolutionPasses
Source code excerpt:
else if (IsRHIDeviceIntel())
{
bUse16BitVALU = CVarTSR16BitVALUOnIntel.GetValueOnRenderThread() != 0;
}
else if (IsRHIDeviceNVIDIA())
{
bUse16BitVALU = CVarTSR16BitVALUOnNvidia.GetValueOnRenderThread() != 0;
}
}