r.DumpGPU.ConsoleVariables

r.DumpGPU.ConsoleVariables

#Overview

name: r.DumpGPU.ConsoleVariables

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.DumpGPU.ConsoleVariables is to control whether rendering console variables are dumped during GPU information collection. This setting is part of Unreal Engine’s rendering and debugging system.

The Unreal Engine subsystem that relies on this setting variable is the rendering core, specifically the GPU dump functionality. This can be inferred from the file location (RenderCore/Private/DumpGPU.cpp) where the variable is defined and used.

The value of this variable is set as a console variable with a default value of 1 (enabled). It can be modified at runtime through the console or programmatically.

This variable interacts with the associated variable GDumpRenderingConsoleVariablesCVar, which is the actual TAutoConsoleVariable object that stores and manages the value of r.DumpGPU.ConsoleVariables.

Developers should be aware that:

  1. This variable affects the amount of information collected during GPU dumps.
  2. Enabling this variable (value != 0) will dump all console variables, while disabling it will only dump variables starting with “r.DumpGPU.”.

Best practices when using this variable include:

  1. Leave it enabled (default value) for comprehensive debugging information.
  2. Disable it if you want to focus only on GPU-specific variables or reduce the amount of data collected.

Regarding the associated variable GDumpRenderingConsoleVariablesCVar:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:135

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


static TAutoConsoleVariable<int32> GDumpRenderingConsoleVariablesCVar(
	TEXT("r.DumpGPU.ConsoleVariables"), 1,
	TEXT("Whether to dump rendering console variables (enabled by default)."),
	ECVF_Default);

static TAutoConsoleVariable<int32> GDumpTestEnableDiskWrite(
	TEXT("r.DumpGPU.Test.EnableDiskWrite"), 1,
	TEXT("Main switch whether any files should be written to disk, used for r.DumpGPU automation tests to not fill up workers' hard drive."),

#Associated Variable and Callsites

This variable is associated with another variable named GDumpRenderingConsoleVariablesCVar. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:134

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

	ECVF_Default);

static TAutoConsoleVariable<int32> GDumpRenderingConsoleVariablesCVar(
	TEXT("r.DumpGPU.ConsoleVariables"), 1,
	TEXT("Whether to dump rendering console variables (enabled by default)."),
	ECVF_Default);

static TAutoConsoleVariable<int32> GDumpTestEnableDiskWrite(
	TEXT("r.DumpGPU.Test.EnableDiskWrite"), 1,

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:606

Scope (from outer to inner):

file
function     void DumpRenderingCVarsToCSV

Source code excerpt:

			}

			if (GDumpRenderingConsoleVariablesCVar.GetValueOnAnyThread() != 0)
			{
				IConsoleManager::Get().ForEachConsoleObjectThatStartsWith(FConsoleObjectVisitor::CreateLambda(OnConsoleVariable), TEXT(""));
			}
			else
			{
				IConsoleManager::Get().ForEachConsoleObjectThatStartsWith(FConsoleObjectVisitor::CreateLambda(OnConsoleVariable), TEXT("r.DumpGPU."));