r.RayTracing.NonBlockingPipelineCreation

r.RayTracing.NonBlockingPipelineCreation

#Overview

name: r.RayTracing.NonBlockingPipelineCreation

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

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingMaterialHitShaders.cpp:49

Scope: file

Source code excerpt:

static int32 GRayTracingNonBlockingPipelineCreation = 1;
static FAutoConsoleVariableRef CVarRayTracingNonBlockingPipelineCreation(
	TEXT("r.RayTracing.NonBlockingPipelineCreation"),
	GRayTracingNonBlockingPipelineCreation,
	TEXT("Enable background ray tracing pipeline creation, without blocking RHI or Render thread.\n")
	TEXT("Fallback opaque black material will be used for missing shaders meanwhile.\n")
	TEXT(" 0: off (rendering will always use correct requested material)\n")
	TEXT(" 1: on (default, non-blocking mode may sometimes use the fallback opaque black material outside of offline rendering scenarios)\n"),
	ECVF_RenderThreadSafe);

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/ShaderPipelineCache.cpp:1130

Scope (from outer to inner):

file
function     bool FShaderPipelineCacheTask::Precompile

Source code excerpt:

			// it is possible for the wrong size to be used here, which leads to a D3D run-time error when attempting to create the PSO.
			// Ray tracing shader pre-compilation is disabled until a robust solution is found.
			// Consider setting r.RayTracing.NonBlockingPipelineCreation=1 meanwhile to avoid most of the RTPSO creation stalls during gameplay.
			if (IsRayTracingEnabled())
			{
				FRayTracingShaderRHIRef RayTracingShader = FShaderCodeLibrary::CreateRayTracingShader(Platform, PSO.RayTracingDesc.ShaderHash, PSO.RayTracingDesc.Frequency);
				if (RayTracingShader.IsValid())
				{
					FRayTracingPipelineStateInitializer Initializer;