PSO Collection on iOS devices

Hi,

I have been trawling through the documentation for PSO caching and collection. There are adequate resources as to how to achieve this on desktop platforms and on Android. However, I am struggling to understand how PSO collection can be done on an iOS device.

In terms of the actual collection process, this all seems to be quite straight forward and I would assume that the setup is identical to it’s Android counterpart.

However, once collection is completed I don’t understand how I would actually extract the files from the device. I don’t seem to immediately be able to find any resources to help with this part of the process, other than possibly some third party tools that would allow me to browse the iOS file system from a connected Mac (But I can’t find anything of major use without Jailbreaking). If there is a third party or development tool that I am just unaware of for this exact purpose it would be incredibly useful as for the time being I am a little stuck with extracting my PSO collections from the device.

Thanks,

Luke

I have been attempting to make some progress with PSO collection on iOS however I have run into some further issues. When I try to run a build on a device with the appropriate console variables for collecting the logged PSO cache the build crashes.

The call stack for the crashed thread is:

Thread 21 name:  RenderThread 0
Thread 21 Crashed:
0   libsystem_kernel.dylib        	       0x1bc2e3bbc __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1dcd84844 pthread_kill + 208
2   libsystem_c.dylib             	       0x18c0f86ac abort + 124
3   ShooterGame                   	       0x106ba775c FGenericPlatformMisc::RequestExit(bool) + 80
4   ShooterGame                   	       0x106cd9124 FIOSErrorOutputDevice::Serialize(char16_t const*, ELogVerbosity::Type, FName const&) + 172
5   ShooterGame                   	       0x106dacfec FOutputDevice::LogfImpl(char16_t const*, ...) + 224
6   ShooterGame                   	       0x106d2723c FDebug::CheckVerifyFailedImpl(char const*, char const*, int, void*, char16_t const*, ...) + 288
7   ShooterGame                   	       0x108102184 FPipelineFileCacheManager::SavePipelineFileCache(FPipelineFileCacheManager::SaveMode) + 540
8   ShooterGame                   	       0x1082f0da8 FShaderPipelineCache::SavePipelineFileCache(FPipelineFileCacheManager::SaveMode) + 80
9   ShooterGame                   	       0x1082fb128 FShaderPipelineCache::Tick(float) + 1160
10  ShooterGame                   	       0x10824f2d0 TickRenderingTickables() + 216
11  ShooterGame                   	       0x10827814c TGraphTask<TEnqueueUniqueRenderCommandType<FRenderingThreadTickHeartbeat::Run()::HeartbeatTickTickablesName, FRenderingThreadTickHeartbeat::Run()::'lambda'(FRHICommandList&)> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) + 844
12  ShooterGame                   	       0x106afc2ac FNamedTaskThread::ProcessTasksNamedThread(int, bool) + 2120
13  ShooterGame                   	       0x106afa92c FNamedTaskThread::ProcessTasksUntilQuit(int) + 184
14  ShooterGame                   	       0x106af99a4 FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) + 332
15  ShooterGame                   	       0x10824fd44 RenderingThreadMain(FEvent*) + 1612
16  ShooterGame                   	       0x108271c84 FRenderingThread::Run() + 60
17  ShooterGame                   	       0x106c2cba8 FRunnableThreadPThread::Run() + 220
18  ShooterGame                   	       0x106bc0e24 FRunnableThreadPThread::_ThreadProc(void*) + 104
19  libsystem_pthread.dylib       	       0x1dcd7a338 _pthread_start + 116
20  libsystem_pthread.dylib       	       0x1dcd78938 thread_start + 8

To collect the PSO cache I am running the build with the following console variables set in the device profile:

[iOS DeviceProfile]
;+CVars=r.SetFramePace 30
;+CVars=r.MobileContentScaleFactor=1
+CVars=r.ShaderPipelineCache.Enabled=1
+CVars=r.ShaderPipelineCache.ReportPSO=1
+CVars=r.ShaderPipelineCache.StartupMode=1
+CVars=r.ShaderPipelineCache.GameFileMaskEnabled=0
+Cvars=r.ShaderPipelineCache.LazyLoadShadersWhenPSOCacheIsPresent=1
+CVars=r.ShaderPipelineCache.BatchSize=50
+CVars=r.ShaderPipelineCache.BatchTime=16.0
+CVars=r.ShaderPipelineCache.BackgroundBatchSize=1
+CVars=r.ShaderPipelineCache.PrecompileBatchSize=50
+CVars=r.ShaderPipelineCache.BackgroundBatchTime=11.0
+CVars=r.ShaderPipelineCache.PrecompileBatchTime=10.0
+CVars=r.ShaderPipelineCache.SaveAfterPSOsLogged=100
+CVars=r.ShaderPipelineCache.AutoSaveTime=30
+CVars=r.ShaderPipelineCache.PreCompileMask=-1
+CVars=r.ShaderPipelineCache.AutoSaveTimeBoundPSO=10
+CVars=r.ShaderPipelineCache.PreOptimizeEnabled=1
+CVars=r.ShaderPipelineCache.MinBindCount=30
+CVars=r.ShaderPipelineCache.MaxPrecompileTime=33
+CVars=r.ShaderPipelineCache.LogPSO=1
+CVars=r.ShaderPipelineCache.SaveBoundPSOLog=1
;+CVars=r.ShaderPipelineCache.SaveUserCache=0
+CVars=rhi.Metal.CacheShaderPipelines=1

As of this point I am a little stuck on how to progress as I have not yet been able to identify what could potentially be causing the crash. Any help or assistance would be greatly appreciated.

I have also attached the full iOS crashlog below if that is of any use.

ShooterGame 13-09-2023, 10-03.crash (34.8 KB)

Hi, I am having the same issue, did you manage to get the PSO files?

I searched alot and I didn’t find any solution for iOS devices. This subject feels like totally unknown for some reason, I found only 2 videos on Youtube, older version and not for iOS.

Thanks