r.ShaderpipelineCache.StartupMode=0 is a option for stop precompile using PSO Caching, but it doesn't work properly.
After CL-5837455, FShaderPipelineCache::ResumeBatching() is always called in FEngineLoop::Init(). So precompile always run if using r.ShaderpipelineCache.StartupMode=0.
FEngineLoop::Init() { ... FShaderPipelineCache::PauseBatching(); { #if defined(WITH_CODE_GUARD_HANDLER) && WITH_CODE_GUARD_HANDLER void CheckImageIntegrity(); CheckImageIntegrity(); #endif } { SCOPED_BOOT_TIMING("FCoreDelegates::OnFEngineLoopInitComplete.Broadcast()"); FCoreDelegates::OnFEngineLoopInitComplete.Broadcast(); } FShaderPipelineCache::ResumeBatching(); ... }
This issue can be solved by a following code.
void FShaderPipelineCache::Initialize(EShaderPlatform Platform) { check(ShaderPipelineCache == nullptr); if (FShaderCodeLibrary::IsEnabled()) { FPipelineFileCache::Initialize(GetGameVersionForPSOFileCache()); ShaderPipelineCache = new FShaderPipelineCache(Platform); // add if (CVarPSOFileCacheStartupMode.GetValueOnAnyThread() == 0) { // for ShaderPipelineCache->PausedCount++; PauseBatching(); } // add } }
expect : Precompile using PSO Caching doesn't work
result : it work
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-99713 in the post.
1 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 4.25.3 |
Created | Sep 16, 2020 |
---|---|
Resolved | Jun 8, 2022 |
Updated | Jun 14, 2022 |