r.RHICmdWidth

r.RHICmdWidth

#Overview

name: r.RHICmdWidth

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.RHICmdWidth is to control the task granularity of various operations in the parallel renderer of Unreal Engine 5. This setting variable plays a crucial role in managing the parallelization of rendering tasks.

Regarding the associated variable CVarRHICmdWidth:

In summary, both r.RHICmdWidth and CVarRHICmdWidth are critical for fine-tuning the parallel rendering performance in Unreal Engine 5, and their proper use requires careful consideration of the specific application requirements and target hardware capabilities.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:43

Scope: file

Source code excerpt:


TAutoConsoleVariable<int32> CVarRHICmdWidth(
	TEXT("r.RHICmdWidth"), 
	8,
	TEXT("Controls the task granularity of a great number of things in the parallel renderer."));

TAutoConsoleVariable<int32> CVarRHICmdFlushRenderThreadTasks(
	TEXT("r.RHICmdFlushRenderThreadTasks"),
	0,

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:42

Scope: file

Source code excerpt:

	TEXT("1: Enable (convenient for debugging low level graphics API calls, can suppress artifacts from multithreaded renderer code)"));

TAutoConsoleVariable<int32> CVarRHICmdWidth(
	TEXT("r.RHICmdWidth"), 
	8,
	TEXT("Controls the task granularity of a great number of things in the parallel renderer."));

TAutoConsoleVariable<int32> CVarRHICmdFlushRenderThreadTasks(
	TEXT("r.RHICmdFlushRenderThreadTasks"),

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/RHICommandList.h:169

Scope: file

Source code excerpt:


extern RHI_API bool GEnableAsyncCompute;
extern RHI_API TAutoConsoleVariable<int32> CVarRHICmdWidth;
extern RHI_API TAutoConsoleVariable<int32> CVarRHICmdFlushRenderThreadTasks;


struct FRHICopyTextureInfo
{
	FIntRect GetSourceRect() const

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:755

Scope (from outer to inner):

file
function     FParallelCommandListSet::FParallelCommandListSet

Source code excerpt:

	, bHasRenderPasses(bInHasRenderPasses)
{
	Width = CVarRHICmdWidth.GetValueOnRenderThread();
	MinDrawsPerCommandList = CVarRHICmdMinDrawsPerParallelCmdList.GetValueOnRenderThread();
	QueuedCommandLists.Reserve(Width * 8);
	check(!GOutstandingParallelCommandListSet);
	GOutstandingParallelCommandListSet = this;
}