r.DumpGPU.CameraCut

r.DumpGPU.CameraCut

#Overview

name: r.DumpGPU.CameraCut

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.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:

  1. This variable affects the behavior of GPU dumps, which are typically used for debugging and profiling.
  2. 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.
  3. The effect of this variable is only relevant when performing GPU dumps.

Best practices when using this variable include:

  1. Only enable it when necessary for debugging or profiling purposes.
  2. Be aware that enabling this might affect the performance or behavior of the rendering system during dumps.
  3. Use in conjunction with other GPU dumping tools and settings for comprehensive analysis.
  4. Reset to the default value (0) after debugging to ensure normal operation.

Regarding the associated variable GDumpGPUCameraCut:

#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;
}