r.TSR.16BitVALU.AMD
r.TSR.16BitVALU.AMD
#Overview
name: r.TSR.16BitVALU.AMD
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Overrides whether to use 16bit VALU on AMD desktop GPUs
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.TSR.16BitVALU.AMD is to control whether 16-bit Vector Arithmetic Logic Unit (VALU) operations are used on AMD desktop GPUs for Temporal Super Resolution (TSR) calculations in Unreal Engine 5.
This setting variable is primarily used in the rendering system, specifically for the Temporal Super Resolution feature. It is part of the Renderer module in Unreal Engine 5.
The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of 1, meaning it’s enabled by default. Developers can change this value at runtime using console commands or through configuration files.
The associated variable CVarTSR16BitVALUOnAMD directly interacts with r.TSR.16BitVALU.AMD. They share the same value and purpose.
Developers must be aware that this variable is specific to AMD desktop GPUs. Similar variables exist for Intel (r.TSR.16BitVALU.Intel) and potentially other GPU manufacturers. The effect of this variable is only applicable when running on AMD hardware.
Best practices when using this variable include:
- Testing performance with both 16-bit and 32-bit VALU operations on target AMD hardware.
- Considering the trade-off between performance and precision when enabling or disabling 16-bit VALU.
- Ensuring that enabling 16-bit VALU doesn’t introduce visual artifacts in the final rendered image.
Regarding the associated variable CVarTSR16BitVALUOnAMD:
- Its purpose is identical to r.TSR.16BitVALU.AMD, controlling the use of 16-bit VALU on AMD desktop GPUs for TSR.
- It is used in the same Temporal Super Resolution system within the Renderer module.
- Its value is set and accessed using the CVar system, with GetValueOnRenderThread() used to retrieve the current value.
- It directly determines whether 16-bit VALU is used in the TSR calculations for AMD GPUs.
- Developers should be aware that this variable is checked specifically when the engine detects it’s running on an AMD GPU.
- Best practices include consistent use with r.TSR.16BitVALU.AMD and thorough testing on various AMD GPU models to ensure optimal performance and visual quality.
#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:90
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnAMD(
TEXT("r.TSR.16BitVALU.AMD"), 1,
TEXT("Overrides whether to use 16bit VALU on AMD desktop GPUs"),
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnIntel(
TEXT("r.TSR.16BitVALU.Intel"), 1,
TEXT("Overrides whether to use 16bit VALU on Intel desktop GPUs"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarTSR16BitVALUOnAMD
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:89
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
#if PLATFORM_DESKTOP
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnAMD(
TEXT("r.TSR.16BitVALU.AMD"), 1,
TEXT("Overrides whether to use 16bit VALU on AMD desktop GPUs"),
ECVF_RenderThreadSafe);
TAutoConsoleVariable<int32> CVarTSR16BitVALUOnIntel(
TEXT("r.TSR.16BitVALU.Intel"), 1,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/TemporalSuperResolution.cpp:1283
Scope (from outer to inner):
file
function FDefaultTemporalUpscaler::FOutputs AddTemporalSuperResolutionPasses
Source code excerpt:
if (IsRHIDeviceAMD())
{
bUse16BitVALU = CVarTSR16BitVALUOnAMD.GetValueOnRenderThread() != 0;
}
else if (IsRHIDeviceIntel())
{
bUse16BitVALU = CVarTSR16BitVALUOnIntel.GetValueOnRenderThread() != 0;
}
else if (IsRHIDeviceNVIDIA())