r.DumpGPU.FixedTickRate

r.DumpGPU.FixedTickRate

#Overview

name: r.DumpGPU.FixedTickRate

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.FixedTickRate is to override the engine’s tick rate to be fixed for every dumped frame during GPU dump operations. This setting is primarily used for debugging and profiling purposes within the rendering system of Unreal Engine 5.

This setting variable is utilized by the RenderCore module, specifically within the GPU dumping functionality. It’s part of the engine’s performance analysis and debugging tools, allowing developers to control the engine’s behavior during GPU dump operations.

The value of this variable is set through the console variable system, with a default value of 0.0f. It can be modified at runtime using console commands or through configuration files.

The associated variable GDumpGPUFixedTickRate directly interacts with r.DumpGPU.FixedTickRate. They share the same value and purpose.

Developers must be aware that:

  1. This variable only takes effect when its value is greater than 0.0f.
  2. It temporarily overrides the engine’s default time step behavior.
  3. It affects the entire engine’s tick rate during the dump operation, which could impact gameplay and other systems.

Best practices when using this variable include:

  1. Use it only for debugging and profiling purposes, not in production builds.
  2. Remember to reset the engine’s tick rate after the dump operation is complete.
  3. Be cautious when setting very high or very low values, as they might cause unexpected behavior in the engine.

Regarding the associated variable GDumpGPUFixedTickRate:

When working with GDumpGPUFixedTickRate, developers should:

  1. Access its value using the GetValueOnGameThread() method to ensure thread safety.
  2. Be aware that changes to this variable will directly affect the r.DumpGPU.FixedTickRate console variable and vice versa.
  3. Use it in conjunction with FApp::SetFixedDeltaTime() and FApp::SetUseFixedTimeStep() to properly control the engine’s time step behavior during GPU dump operations.

#References in C++ code

#Callsites

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

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

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


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)."),
	ECVF_Default);

static TAutoConsoleVariable<int32> GDumpGPUStream(
	TEXT("r.DumpGPU.Stream"), 0,
	TEXT("Asynchronously readback from GPU to disk.\n")

#Associated Variable and Callsites

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

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

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

	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)."),
	ECVF_Default);

static TAutoConsoleVariable<int32> GDumpGPUStream(
	TEXT("r.DumpGPU.Stream"), 0,

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

Scope (from outer to inner):

file
function     void FRDGResourceDumpContext::Start

Source code excerpt:

	}

	if (GDumpGPUFixedTickRate.GetValueOnGameThread() > 0.0f && !FApp::UseFixedTimeStep())
	{
		bOverrideFixedDeltaTime = true;
		PreviousFixedDeltaTime = FApp::GetFixedDeltaTime();

		FApp::SetFixedDeltaTime(1.0f / GDumpGPUFixedTickRate.GetValueOnGameThread());
		FApp::SetUseFixedTimeStep(true);

		UE_LOG(LogDumpGPU, Display, TEXT("DumpGPU overriding tick rate to %fs"), float(FApp::GetFixedDeltaTime()));
	}

	// Output informations