Forum Discussion

SaltedSlug's avatar
SaltedSlug
Explorer
28 days ago
Solved

UE 5.5.1 v74 - Oculus Quest 3 not generating the PSO .upipelinecache file

We are using the Meta Fork of UE, 5.5.1 v74.

I've followed through every single piece of online documentation I could find on how to get the PSO cache to work on the Quest 3. Nothing works. No pipeline cache file gets created on device.

Has anyone gotten it to work? If so, how?

Thanks!

Scott

  • SaltedSlug's avatar
    SaltedSlug
    24 days ago

    After much digging, I've figured it out. There is an Vulkan setting that needs to be turned on to enable the legacy bundling method.

    r.Vulkan.EnablePSOFileCacheWhenPrecachingActive=1


    With this on, the CollectedPSOs folder does get created along with the upipelinecache file. This flag works in both 5.5.3 as well as 5.5.1.

7 Replies

  • Hey Scott, 

    I haven't tried this, but I meant to do it soon.
    Could you please clarify the steps you took to log PSO and include them ?
    At which stage you experienced it "not working" ? 
    Best, 
    Vitalii

  • I had setup and bundled PSOs on a PC based UE 5.1 project last year, so I was hoping it would still work even though it is now 'legacy'.
     
    I was following the steps for an Android build contained within:
     
     
    For me, using the Project Launcher never loaded past the initial splash screen with either ASTC or ETC2 cooked builds.
     
    I was able to use the UnrealAndroidFileTool to modify the UECommandLine.txt to add the -logPSO to an installed build that had all of the required project settings. Upon running this build, no CollectedPSOs directory was created.
     
    I'll be trying the new method today:
     
     

    I'll update this thread with my results.

    • vitono.1's avatar
      vitono.1
      Explorer

      I would also try to launch a game via command line:
      1. Make sure headset is connected in debug mode
      2. Modify this command to your your project name, company name

      adb shell am start -n com.YourCompany.YourProject/com.epicgames.unreal.GameActivity --es "cmd" "-logpso"

       this should start you latest packaged build, with pso logging enabled, in theory.
      Generated pso file will be in your saved folder on quest


  • Hi Vitalii, 
    Thanks for the recommendation. However, the command you provided does launch the app, it did not set the logPSO flag as a parameter. The UnrealAndroidFileTool continues to work. I verified in the log file that the logPSO command is getting set.

    This time though, I did notice that there is an Ensure being hit while playing. It looks suspect. Not sure how I missed this when I first posted. I wonder if there are settings in the new method that are stomping the old legacy. 
      
    [2025.06.16-20.24.12:723][  0]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.068 s
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: === Handled ensure: ===
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: 
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: Ensure condition failed: oldValue == newValue  [File:./Runtime/Core/Private/HAL/ThreadingBase.cpp] [Line: 318] 
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: oldValue(1) newValue(0) If this check fails make sure that there is a FTaskTagScope(ETaskTag::EParallelRenderingThread) as deep as possible on the current callstack, you can see the current value in ActiveNamedThreads(40000002), GRenderingThread(311e9a70)
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: Stack: 
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E4EC714 libUnreal.so(0x000000000AD95714)![Unknown]()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E4EC680 libUnreal.so(0x000000000AD95680)!IsInParallelRenderingThread()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007924AAC734 libUnreal.so(0x0000000011355734)!FMaterial::GetRenderingThreadShaderMap() const  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007921FE0D28 libUnreal.so(0x000000000E889D28)!MobileBasePass::GetShaders(ELightMapPolicyType, EMobileLocalLightSetting, int, bool, FMaterial const&, FVertexFactoryType const*, TShaderRefBase<TMobileBasePassVSPolicyParamType<FUniformLightMapPolicy>, FShaderMapPointerTable>&, TShaderRefBase<TMobileBasePassPSPolicyParamType<FUniformLightMapPolicy>, FShaderMapPointerTable>&)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007921FE2C74 libUnreal.so(0x000000000E88BC74)!FMobileBasePassMeshProcessor::CollectPSOInitializersForLMPolicy(FPSOPrecacheVertexFactoryData const&, FMeshPassProcessorRenderState const&, FGraphicsPipelineRenderTargetsInfo const&, FMaterial const&, EMobileLocalLightSetting, unsigned int, ELightMapPolicyType, ERasterizerFillMode, ERasterizerCullMode, EPrimitiveType, TArray<FPSOPrecacheData, TSizedDefaultAllocator<32> >&)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007921FE42D4 libUnreal.so(0x000000000E88D2D4)!FMobileBasePassMeshProcessor::CollectPSOInitializers(FSceneTexturesConfig const&, FMaterial const&, FPSOPrecacheVertexFactoryData const&, FPSOPrecacheParams const&, TArray<FPSOPrecacheData, TSizedDefaultAllocator<32> >&)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007924AB8124 libUnreal.so(0x0000000011361124)!FMaterialShaderMap::CollectPSOPrecacheData(FMaterialPSOPrecacheParams const&)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007924F4D930 libUnreal.so(0x00000000117F6930)!FMaterialPSOPrecacheCollectionTask::DoTask(ENamedThreads::Type, TRefCountPtr<FBaseGraphTask> const&)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007924F6BD6C libUnreal.so(0x0000000011814D6C)!TGraphTask<FMaterialPSOPrecacheCollectionTask>::ExecuteTask()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2F3348 libUnreal.so(0x000000000AB9C348)!UE::Tasks::Private::FTaskBase::TryExecuteTask()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2F2920 libUnreal.so(0x000000000AB9B920)!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask* (bool), 48u>::TTaskDelegateImpl<void LowLevelTasks::FTask::Init<UE::Tasks::Private::FTaskBase::Init(char16_t const*, LowLevelTasks::ETaskPriority, UE::Tasks::EExtendedTaskPriority, UE::Tasks::ETaskFlags)::{lambda()#1}>(char16_t const*, LowLevelTasks::ETaskPriority, UE::Tasks::Private::FTaskBase::Init(char16_t const*, LowLevelTasks::ETaskPriority, UE::Tasks::EExtendedTaskPriority, UE::Tasks::ETaskFlags)::{lambda()#1}&&, LowLevelTasks::ETaskFlags)::{lambda(bool)#1}, false>::CallAndMove(LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask* (bool), 48u>&, void*, unsigned int, bool)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2D31F0 libUnreal.so(0x000000000AB7C1F0)!LowLevelTasks::FScheduler::ExecuteTask(LowLevelTasks::FTask*)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2D50A4 libUnreal.so(0x000000000AB7E0A4)!bool LowLevelTasks::FScheduler::TryExecuteTaskFrom<LowLevelTasks::Private::TLocalQueueRegistry<1024u, 1024u>::TLocalQueue, &LowLevelTasks::Private::TLocalQueueRegistry<1024u, 1024u>::TLocalQueue::Dequeue, false>(LowLevelTasks::Private::FWaitEvent*, LowLevelTasks::Private::TLocalQueueRegistry<1024u, 1024u>::TLocalQueue*, LowLevelTasks::Private::FOutOfWork&, bool)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2D4930 libUnreal.so(0x000000000AB7D930)!LowLevelTasks::FScheduler::WorkerLoop(LowLevelTasks::Private::FWaitEvent*, LowLevelTasks::Private::TLocalQueueRegistry<1024u, 1024u>::TLocalQueue*, unsigned int, bool)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2D563C libUnreal.so(0x000000000AB7E63C)!LowLevelTasks::FScheduler::WorkerMain(LowLevelTasks::Private::FWaitEvent*, LowLevelTasks::Private::TLocalQueueRegistry<1024u, 1024u>::TLocalQueue*, unsigned int, bool)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E534038 libUnreal.so(0x000000000ADDD038)!FThreadImpl::Run()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E4E6A18 libUnreal.so(0x000000000AD8FA18)!FRunnableThreadPThread::Run()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x000000791E2F87C4 libUnreal.so(0x000000000ABA17C4)!FRunnableThreadPThread::_ThreadProc(void*)  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007A44721110 libc.so(0x00000000000FD110)![Unknown]()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: [Callstack] 0x0000007A446B8FB4 libc.so(0x0000000000094FB4)![Unknown]()  []
    [2025.06.16-20.24.12:723][  0]LogOutputDevice: Error: 
     

    There is a PSO cache file being saved on exit, however, this is not the Pipeline cache that I'm expecting with the legacy bundling procedure...
     
    [2025.06.16-20.24.24:182][669]LogVulkanRHI: Display: FVulkanPipelineStateCacheManager: Saved device pipeline cache file '../../../XXXX/Saved/VulkanPSO.cache.5143.43050b00', 92675 bytes

    I'm going to continue experimenting with the new system. Hopefully, I'm able to produce similar results as to what I was expecting with the bundled approach.
    Thanks!

  • Just to triple check, can you make sure you added in DefaultEngine.ini

    [Vulcan.Settings]
    r.ShaderPipelineCache.Enabled=1
    r.ShaderPipelineCache.Precompile=1
    • SaltedSlug's avatar
      SaltedSlug
      Explorer
      Thanks for the response, however neither of these make a difference.
       
      r.ShaderPipelineCache.Enabled is 1 by default (and is not modified in any .ini)
      r.ShaderPipelineCache.Precompile does not exist anywhere in the engine code. There are several variants PrecompileBatchSize, PrecompileBatchTime, and PrecompileMask.
       
      For completeness sake though, and because UE will be UE sometimes, I did add these to the DefaultEngine.ini of our 5.5.1 engine build and still no CollectedPSOs directory after running on device. 
       
      When trying the new method of PSO caching (as documented in the second link I posted above), the build crashed on load.
       
      Upon investigating this crash, I found that Meta had pushed PSO related changes into the fork for 5.5.3 support. So, I did end up updating our UE fork to the latest 5.5.3 v77 version from Meta. And thankfully, the new method PSO ini settings no longer cause a crash on device. But unfortunately, the initial material loading is basically the same as without the new system. Ugh. I have not yet tried the logPSO on the 5.5.3 engine build, but will get to this after I wrangle some other items the team needs from me. Milestone day and being the only client engineer on the team are fun! ğŸ˜… 

      Post milestone, I'll likely update the team to the new 5.5.3 engine regardless

       

      • SaltedSlug's avatar
        SaltedSlug
        Explorer

        After much digging, I've figured it out. There is an Vulkan setting that needs to be turned on to enable the legacy bundling method.

        r.Vulkan.EnablePSOFileCacheWhenPrecachingActive=1


        With this on, the CollectedPSOs folder does get created along with the upipelinecache file. This flag works in both 5.5.3 as well as 5.5.1.