r.VT.Verbose
r.VT.Verbose
#Overview
name: r.VT.Verbose
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Be pedantic about certain things that shouln\'t occur unless something is wrong. This may cause a lot of logspam 100\'s of lines per frame.
It is referenced in 7
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.VT.Verbose is to enable verbose logging for the Virtual Texturing system in Unreal Engine 5. It is used to provide detailed information about certain operations and potential issues within the Virtual Texturing subsystem.
This setting variable is primarily used by the Renderer module, specifically within the Virtual Texturing (VT) system. It is referenced in multiple files related to Virtual Texturing, including VirtualTextureSystem.cpp, VirtualTextureChunkManager.cpp, and AllocatedVirtualTexture.cpp.
The value of this variable is set through the console variable system. It is defined as a TAutoConsoleVariable with a default value of 0, which means verbose logging is disabled by default.
This variable interacts closely with its associated variable CVarVTVerbose. They share the same value and are used interchangeably in the code.
Developers must be aware that enabling this variable (setting it to a non-zero value) can result in a significant amount of log output, potentially hundreds of lines per frame. This can impact performance and should be used primarily for debugging purposes.
Best practices when using this variable include:
- Enable it only when debugging Virtual Texturing issues.
- Be prepared for a large volume of log output when enabled.
- Disable it in production builds to avoid performance impacts.
Regarding the associated variable CVarVTVerbose:
The purpose of CVarVTVerbose is identical to r.VT.Verbose. It is used internally within the Virtual Texturing system to control verbose logging.
CVarVTVerbose is defined in the Renderer module and is used in various parts of the Virtual Texturing system to conditionally output detailed logging information.
The value of CVarVTVerbose is set when r.VT.Verbose is set, as they share the same underlying console variable.
Developers should treat CVarVTVerbose the same way as r.VT.Verbose. It’s an internal representation of the same setting and should be considered when reviewing or modifying Virtual Texturing code.
Best practices for CVarVTVerbose are the same as for r.VT.Verbose. It should be used judiciously for debugging purposes and disabled in production to avoid performance impacts due to excessive logging.
#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:73
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarVTVerbose(
TEXT("r.VT.Verbose"),
0,
TEXT("Be pedantic about certain things that shouln't occur unless something is wrong. This may cause a lot of logspam 100's of lines per frame."),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVTEnableFeedback(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/VT/VirtualTextureChunkManager.cpp:69
Scope (from outer to inner):
file
function FVTRequestPageResult FVirtualTextureChunkStreamingManager::RequestTile
Source code excerpt:
if (TileOffset == ~0u)
{
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.VT.Verbose"));
if (CVar->GetValueOnRenderThread())
{
UE_LOG(LogConsoleResponse, Display, TEXT("vAddr %i@%i has an invalid tile (-1)."), vAddress, vLevel);
}
return EVTRequestPageStatus::Invalid;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/AllocatedVirtualTexture.cpp:303
Scope (from outer to inner):
file
function bool FAllocatedVirtualTexture::TryMapLockedTiles
Source code excerpt:
if (bHasMissingTiles && InSystem->GetFrame() > FrameAllocated + 30u)
{
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.VT.Verbose"));
if (CVar->GetValueOnRenderThread())
{
UE_LOG(LogVirtualTexturing, Warning, TEXT("Failed to map lowest resolution mip for AllocatedVT %s (%d frames)"), *Description.Name.ToString(), InSystem->GetFrame() - FrameAllocated);
}
}
#Associated Variable and Callsites
This variable is associated with another variable named CVarVTVerbose
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:72
Scope: file
Source code excerpt:
DECLARE_GPU_STAT(VirtualTextureAllocate);
static TAutoConsoleVariable<int32> CVarVTVerbose(
TEXT("r.VT.Verbose"),
0,
TEXT("Be pedantic about certain things that shouln't occur unless something is wrong. This may cause a lot of logspam 100's of lines per frame."),
ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:1580
Scope (from outer to inner):
file
function void FVirtualTextureSystem::GatherRequestsTask
Source code excerpt:
if (!AllocatedVT)
{
if (CVarVTVerbose.GetValueOnAnyThread())
{
UE_LOG(LogConsoleResponse, Display, TEXT("Space %i, vAddr %i@%i is not allocated to any AllocatedVT but was still requested."), ID, vAddress, vLevel);
}
continue;
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:2082
Scope (from outer to inner):
file
function void FVirtualTextureSystem::SubmitThrottledRequests
Source code excerpt:
{
// Dropping requests is normal but track to log here if we want to tune settings.
if (CVarVTVerbose.GetValueOnRenderThread())
{
UE_LOG(LogConsoleResponse, Display, TEXT("VT dropped %d load requests."), MergedRequestList->GetNumLoadRequests() - OldNumLoadRequests);
}
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSystem.cpp:2194
Scope (from outer to inner):
file
function void FVirtualTextureSystem::SubmitRequests
Source code excerpt:
bTileInvalid = true;
if (CVarVTVerbose.GetValueOnAnyThread())
{
UE_LOG(LogConsoleResponse, Display, TEXT("vAddr %i@%i is not a valid request for AllocatedVT but is still requested."), TileToLoad.Local_vAddress, TileToLoad.Local_vLevel);
}
}
else if (RequestPageResult.Status == EVTRequestPageStatus::Available)
{