r.DumpGPU.Upload
r.DumpGPU.Upload
#Overview
name: r.DumpGPU.Upload
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to upload the GPU dump automatically if set-up.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DumpGPU.Upload is to control the automatic uploading of GPU dumps. This setting variable is used in the rendering system, specifically for debugging and performance analysis of GPU operations.
This setting variable is primarily used in the RenderCore module of Unreal Engine, as evidenced by its location in the DumpGPU.cpp file within the Runtime/RenderCore directory.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, which means GPU dump uploading is enabled by default.
The associated variable GDumpGPUUploadCVar interacts directly with r.DumpGPU.Upload. They share the same value and purpose.
Developers must be aware that:
- This variable controls whether GPU dumps are automatically uploaded when generated.
- Setting this to 0 will disable automatic uploads, which might be necessary in certain development or production scenarios.
- The uploading feature requires proper setup of DumpGPU upload services.
Best practices when using this variable include:
- Ensure that DumpGPU upload services are correctly configured before relying on this feature.
- Consider disabling automatic uploads (setting to 0) in production builds or when not actively debugging GPU issues to avoid unnecessary network traffic or performance impact.
- Use in conjunction with other DumpGPU-related settings for comprehensive GPU debugging.
Regarding the associated variable GDumpGPUUploadCVar:
- It’s the actual CVar object that controls the r.DumpGPU.Upload setting.
- It’s used internally by the engine to check the current value of the setting, as seen in the BeginResourceDump function.
- Developers should typically interact with the r.DumpGPU.Upload console command rather than directly with GDumpGPUUploadCVar in most cases.
- The variable is of type TAutoConsoleVariable
, allowing it to be changed at runtime through console commands.
When working with GDumpGPUUploadCVar, developers should be aware that changes to this variable will immediately affect the GPU dump uploading behavior. It’s important to use the appropriate game thread accessor (GetValueOnGameThread()) when reading its value to ensure thread safety.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:155
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
static TAutoConsoleVariable<int32> GDumpGPUUploadCVar(
TEXT("r.DumpGPU.Upload"), 1,
TEXT("Allows to upload the GPU dump automatically if set-up."),
ECVF_Default);
static TAutoConsoleVariable<int32> GDumpGPUUploadCompressResources(
TEXT("r.DumpGPU.Upload.CompressResources"), 1,
TEXT("Whether to compress resource binary.\n")
#Associated Variable and Callsites
This variable is associated with another variable named GDumpGPUUploadCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:154
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_Default);
static TAutoConsoleVariable<int32> GDumpGPUUploadCVar(
TEXT("r.DumpGPU.Upload"), 1,
TEXT("Allows to upload the GPU dump automatically if set-up."),
ECVF_Default);
static TAutoConsoleVariable<int32> GDumpGPUUploadCompressResources(
TEXT("r.DumpGPU.Upload.CompressResources"), 1,
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:2092
Scope (from outer to inner):
file
function FString FRDGBuilder::BeginResourceDump
Source code excerpt:
UE_LOG(LogDumpGPU, Warning, TEXT("DumpGPU upload services are not set up."));
}
else if (GDumpGPUUploadCVar.GetValueOnGameThread() == 0)
{
UE_LOG(LogDumpGPU, Warning, TEXT("DumpGPU upload services are not available because r.DumpGPU.Upload=0."));
}
else
{
NewResourceDumpContext->bUpload = true;