Hello, I am trying to implement PSO Precache + PSO Bundling for the ones missed by precache to keep things lean but after hours of attempt I can’t still get it to work on Android.
We are using UE 5.5.4.
When I cook and package the build, in the project folder the shk files are generated correctly under Saved\Cooked\Project\Metadata\PipelineCaches, the problem is that when I play on device (Android), when I play tnothing get generated under the saved folder:
Android\data\xxx\files\UnrealGame\Project\Project\Saved
Under this folder I only see configs, profiling, and logs.
[Attachment Removed]
Steps to Reproduce
Hello, I am trying to implement PSO Precache + PSO Bundling for the ones missed by precache to keep things lean but after hours of attempt I can’t still get it to work on Android.
We are using UE 5.5.4.
When I cook and package the build, in the project folder the shk files are generated correctly under Saved\Cooked\Project\Metadata\PipelineCaches, the problem is that when I play on device (Android), when I play tnothing get generated under the saved folder:
Android\data\xxx\files\UnrealGame\Project\Project\Saved
Under this folder I only see configs, profiling, and logs.
Help would be appreciated, this is our setup:
// Config/DefaultEngine.ini
r.PSOPrecaching=1
r.PSOPrecache.ProxyCreationWhenPSOReady=1
r.PSOPrecache.Validation=1
r.ShaderPipelineCache.Enabled=1
r.ShaderPipelineCache.ExcludePrecachePSO=1
r.ShaderPipelineCache.StartupMode=1
// Config/Android/AndroidEngine.ini
[DevOptions.Shaders]
NeedsShaderStableKeys=true
// Config/DefaultGame.ini
bShareMaterialShaderCode=True
bSharedMaterialNativeLibraries=True
// UECommandLine.txt inside the app folder on device to start with -logPSO
../../../xxx/xxx.uproject -logPSO
// I build using:
./RunUAT.bat BuildCookRun -Project=XXX -Platform=Android -Configuration=Development -Build -Cook -IterativeCooking -Stage -Pak -Compressed -Package -Cookflavor=ASTC
[Attachment Removed]
Hi Andrea,
Your setup appears to be correct. Is the presence of the -logPSO argument confimed in the application’s execution log? Does running the r.ShaderPipelineCache.Save console command yield a write out of the UPIPELINECACHE file?
Best regards.
[Attachment Removed]
Hi, [mention removed] yes, -logPSO is confirmed in the logs and r.ShaderPipelineCache.Save don’t help.
Looking at the logs I noticed a line like this:
LogVulkanRHI: Vulkan PSO Precaching = 1, PipelineFileCache = 0
That PipelineFileCache = 0 sounds suspicious, but if all the settings are correct what may cause this? Some of our settings may override each others?
The ShaderPipelineCache batching is toggling (Paused/Resumed/Batch mode changed), confirming it’s active at runtime.
Inside the saved folder I have noticed a: VulkanPSO.cache.5143.43051401 file.
Not sure if this was triggered by r.ShaderPipelineCache.Save:
LogVulkanRHI: Display: FVulkanPipelineStateCacheManager: Saved device pipeline cache file ‘../../../xxx/Saved/VulkanPSO.cache.5143.43051401’, 13813220 bytes
Thanks for the support
[Attachment Removed]
I’ve found this command while searching around the engine code and online.
r.Vulkan.EnablePSOFileCacheWhenPrecachingActive=True
Seems like this may be part of the issue, I will keep you posted as soon as I can test it.
EDIT: Yes, this seems to fix the issue. I am still keeping this post open because I may need some help with some other settings, to understand what I need to keep on or set off
**EDIT2: All works great on first boot, but second boot we get a crash now… looking around I found this post [mention removed]** with a comment of yours that mark this as a known issue on 5.5, is this still the case?
[Content removed]
[Attachment Removed]
Hi Andrea,
Yes, PSO precaching wasn’t considered completely functional in 5.5 against the Vulkan RHI. This would still be the case as 5.5 wasn’t updated beyond patch 5.5.4 and wouldn’t get any LTS beyond that. Interesting about r.Vulkan.EnablePSOFileCacheWhenPrecachingActive, as this appears to be enabiled by default in stock 5.5 by AndroidEngine.ini.
Best regards.
[Attachment Removed]
Hi [mention removed] , thanks for confirming.
This will have to wait until we can upgrade then.
Best,
Andrea
[Attachment Removed]
Thanks Andrea, please reach out if you have any issues then.
Best regards.
[Attachment Removed]