r.ProfileGPU.AssetSummaryCallOuts

r.ProfileGPU.AssetSummaryCallOuts

#Overview

name: r.ProfileGPU.AssetSummaryCallOuts

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.ProfileGPU.AssetSummaryCallOuts is to specify a list of substrings that deserve special mention in the final summary of GPU profiling data. This setting variable is part of the GPU profiling and performance analysis system in Unreal Engine 5.

This setting variable is primarily used by the RHI (Rendering Hardware Interface) module, specifically within the GPU profiler functionality. It’s referenced in the GPUProfiler.cpp file, which is responsible for collecting and reporting GPU performance data.

The value of this variable is set through the console or configuration files. It accepts a comma-separated list of substrings as a string value. For example, “LOD,HeroName” would be a valid input.

The associated variable GProfileAssetSummaryCallOuts directly interacts with r.ProfileGPU.AssetSummaryCallOuts. It’s an instance of TAutoConsoleVariable that stores the actual value of the setting.

Developers must be aware that this feature is only enabled when r.ProfileGPU.PrintAssetSummary is set to true. The substrings specified will be used to filter and highlight specific assets in the GPU profiling summary.

Best practices when using this variable include:

  1. Use meaningful and specific substrings to target the assets you’re interested in.
  2. Ensure r.ProfileGPU.PrintAssetSummary is set to true for this feature to work.
  3. Use this in conjunction with other GPU profiling tools for a comprehensive performance analysis.

Regarding the associated variable GProfileAssetSummaryCallOuts:

The purpose of GProfileAssetSummaryCallOuts is to store and provide access to the value set by r.ProfileGPU.AssetSummaryCallOuts within the engine’s C++ code.

This variable is used in the RHI module, specifically in the GPU profiler’s PrintSummary function. It’s accessed on the render thread to parse the specified substrings and generate the custom summary output.

The value of this variable is set automatically by the engine based on the r.ProfileGPU.AssetSummaryCallOuts console variable.

GProfileAssetSummaryCallOuts interacts directly with the r.ProfileGPU.AssetSummaryCallOuts console variable, reflecting its value in a format usable by C++ code.

Developers should be aware that this variable is accessed on the render thread, so any modifications should be thread-safe.

Best practices include:

  1. Avoid directly modifying this variable; instead, use the r.ProfileGPU.AssetSummaryCallOuts console variable to set its value.
  2. When reading its value, use the GetValueOnRenderThread() method to ensure thread-safety.
  3. Parse the string value into an array of substrings for easier processing, as demonstrated in the PrintSummary function.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/GPUProfiler.cpp:66

Scope: file

Source code excerpt:

// Should we print a summary at the end?
static TAutoConsoleVariable<FString> GProfileAssetSummaryCallOuts(
	TEXT("r.ProfileGPU.AssetSummaryCallOuts"),
	TEXT(""),
	TEXT("Comma separated list of substrings that deserve special mention in the final summary (e.g., \"LOD,HeroName\"\n")
	TEXT("r.ProfileGPU.PrintAssetSummary must be true to enable this feature"),
	ECVF_Default);

static TAutoConsoleVariable<int32> CVarGPUCrashDataCollectionEnable(

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/GPUProfiler.cpp:65

Scope: file

Source code excerpt:


// Should we print a summary at the end?
static TAutoConsoleVariable<FString> GProfileAssetSummaryCallOuts(
	TEXT("r.ProfileGPU.AssetSummaryCallOuts"),
	TEXT(""),
	TEXT("Comma separated list of substrings that deserve special mention in the final summary (e.g., \"LOD,HeroName\"\n")
	TEXT("r.ProfileGPU.PrintAssetSummary must be true to enable this feature"),
	ECVF_Default);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/GPUProfiler.cpp:256

Scope (from outer to inner):

file
function     void PrintSummary

Source code excerpt:

			// See if we want to call out any particularly interesting matches
			TArray<FString> InterestingSubstrings;
			GProfileAssetSummaryCallOuts.GetValueOnRenderThread().ParseIntoArray(InterestingSubstrings, TEXT(","), true);

			if (InterestingSubstrings.Num() > 0)
			{
				UE_LOG(LogRHI, Log, TEXT(""));
				UE_LOG(LogRHI, Log, TEXT("Information about specified mesh substring matches (r.ProfileGPU.AssetSummaryCallOuts)"));
				for (const FString& InterestingSubstring : InterestingSubstrings)