r.DumpGPU.CameraCut
r.DumpGPU.CameraCut
#Overview
name: r.DumpGPU.CameraCut
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to issue a camera cut on the first frame of the dump.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DumpGPU.CameraCut is to control whether a camera cut should be issued on the first frame of a GPU dump. This setting is primarily used for debugging and profiling purposes within the rendering system of Unreal Engine 5.
This setting variable is part of the RenderCore module, which is a critical component of Unreal Engine’s rendering system. It’s specifically used in the GPU dumping functionality, which is likely used for performance analysis and debugging of GPU-related issues.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined as a TAutoConsoleVariable with an initial value of 0, meaning by default, no camera cut is issued during GPU dumps.
The associated variable GDumpGPUCameraCut directly interacts with r.DumpGPU.CameraCut. They share the same value and purpose. GDumpGPUCameraCut is used in the C++ code to access the value set by the console variable.
Developers must be aware that:
- This variable affects the behavior of GPU dumps, which are typically used for debugging and profiling.
- Setting this variable to 1 will cause a camera cut to occur on the first frame of a GPU dump, which might be useful for certain debugging scenarios.
- The effect of this variable is only relevant when performing GPU dumps.
Best practices when using this variable include:
- Only enable it when necessary for debugging or profiling purposes.
- Be aware that enabling this might affect the performance or behavior of the rendering system during dumps.
- Use in conjunction with other GPU dumping tools and settings for comprehensive analysis.
- Reset to the default value (0) after debugging to ensure normal operation.
Regarding the associated variable GDumpGPUCameraCut:
- Its purpose is to provide C++ code access to the value set by r.DumpGPU.CameraCut.
- It’s used within the RenderCore module, specifically in the GPU dumping functionality.
- Its value is set by the console variable system and accessed in the C++ code.
- It interacts directly with r.DumpGPU.CameraCut, essentially serving as its in-code representation.
- Developers should be aware that modifying GDumpGPUCameraCut directly in code will not persist across sessions; changes should be made through the console variable system.
- Best practice is to use GDumpGPUCameraCut for reading the value in C++ code, and use r.DumpGPU.CameraCut for setting the value through the console or configuration files.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:101
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
static TAutoConsoleVariable<int32> GDumpGPUCameraCut(
TEXT("r.DumpGPU.CameraCut"), 0,
TEXT("Whether to issue a camera cut on the first frame of the dump."),
ECVF_Default);
static TAutoConsoleVariable<float> GDumpGPUFixedTickRate(
TEXT("r.DumpGPU.FixedTickRate"), 0.0f,
TEXT("Override the engine's tick rate to be fixed for every dumped frames (default=0)."),
#Associated Variable and Callsites
This variable is associated with another variable named GDumpGPUCameraCut
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:100
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_Default);
static TAutoConsoleVariable<int32> GDumpGPUCameraCut(
TEXT("r.DumpGPU.CameraCut"), 0,
TEXT("Whether to issue a camera cut on the first frame of the dump."),
ECVF_Default);
static TAutoConsoleVariable<float> GDumpGPUFixedTickRate(
TEXT("r.DumpGPU.FixedTickRate"), 0.0f,
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:2971
Scope (from outer to inner):
file
namespace UE::RenderCore::DumpGPU
function bool ShouldCameraCut
Source code excerpt:
}
if (GDumpGPUCameraCut.GetValueOnGameThread() == 0)
{
return false;
}
return GRDGResourceDumpContext_GameThread->DumpedFrameId == 0;
}