r.DumpGPU.PassParameters
r.DumpGPU.PassParameters
#Overview
name: r.DumpGPU.PassParameters
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to dump the pass parameters.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.DumpGPU.PassParameters is to control whether to dump the pass parameters during GPU debugging. This setting variable is part of the rendering system, specifically for debugging and performance analysis of GPU-related tasks.
This setting variable is primarily used in the RenderCore module of Unreal Engine, as evident from its location in the DumpGPU.cpp file within the Runtime/RenderCore directory. It’s part of the GPU dumping functionality, which is likely used for debugging and profiling GPU operations.
The value of this variable is set as a console variable, initialized with a default value of 1. This means that by default, pass parameters will be dumped.
The associated variable GDumpGPUPassParameters interacts directly with r.DumpGPU.PassParameters. They share the same value and purpose. GDumpGPUPassParameters is used in the actual code to check whether pass parameters should be dumped.
Developers should be aware that:
- This variable affects performance and should be used carefully in production environments.
- It’s render thread safe, meaning it can be safely accessed from the render thread.
- The default value is 1, so pass parameters will be dumped unless explicitly disabled.
Best practices when using this variable include:
- Use it primarily for debugging and profiling purposes.
- Disable it in production builds to avoid unnecessary performance overhead.
- Be aware of the potential impact on frame rate when enabled, especially in complex scenes.
Regarding the associated variable GDumpGPUPassParameters:
- Its purpose is the same as r.DumpGPU.PassParameters - to control the dumping of pass parameters.
- It’s used directly in the code to check whether to dump pass parameters, as seen in the FRDGBuilder::DumpResourcePassOutputs function.
- It’s accessed using the GetValueOnRenderThread() method, ensuring thread-safe access on the render thread.
- Developers should use this variable when they need to programmatically check or set the dump pass parameters option within C++ code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:86
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
static TAutoConsoleVariable<int32> GDumpGPUPassParameters(
TEXT("r.DumpGPU.PassParameters"), 1,
TEXT("Whether to dump the pass parameters."),
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<float> GDumpGPUDelay(
TEXT("r.DumpGPU.Delay"), 0.0f,
TEXT("Delay in seconds before dumping the frame."),
#Associated Variable and Callsites
This variable is associated with another variable named GDumpGPUPassParameters
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:85
Scope (from outer to inner):
file
namespace anonymous
Source code excerpt:
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> GDumpGPUPassParameters(
TEXT("r.DumpGPU.PassParameters"), 1,
TEXT("Whether to dump the pass parameters."),
ECVF_RenderThreadSafe);
static TAutoConsoleVariable<float> GDumpGPUDelay(
TEXT("r.DumpGPU.Delay"), 0.0f,
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/DumpGPU.cpp:2657
Scope (from outer to inner):
file
function void FRDGBuilder::DumpResourcePassOutputs
Source code excerpt:
// Dump the pass' parameters
if (GDumpGPUPassParameters.GetValueOnRenderThread() != 0)
{
int32 PassParametersByteSize = 0;
{
const FShaderParametersMetadata* Metadata = Pass->GetParameters().GetMetadata();
if (Metadata)
{