Hi everyone, I have integrated the PSO Cache system on Android but still get stutters. I use Unreal 4.27.2 with the Oculus branch. I have successfully generated the csv file. When the file is placed in the correct folder (Build\Android\PipelineCaches & I tested also Build\Android_ASTC\PipelineCaches) with a DebugGame client build I can see that it doesn’t find new shaders in the logs. Inside the gameinstance I start a
and I can see that I got 69 shaders to compile avec after some time I have 0 left.
I also ensure that r.ShaderPipelineCache.Enabled is really enabled and I disabled the pso logs with r.ShaderPipelineCache.LogPSO=0
r.ShaderPipelineCache.SaveBoundPSOLog=0
But still after all that I have some freezes which are less important than before but still there. They happen the first time I fire a weapon or the first time I start an ability (these are Niagara systems). I think I also have the stutters with the geometry appearing for the first time but it’s easier to see it with Niagara systems that are spawned for the first time.
Any idea what I could have missed or what I could try to debug this?
I´m having the same issue. In my case there´s also an added little stutter every two seconds.
Can you post your build log to compare?
If I´m not wrong I´ve succesfully cache´d 275 PSOs.
>
>
> [2024.03.06-19.40.51:600][654]UATHelper: Packaging (Android (ASTC)): LogShaderLibrary: Display: =================
> [2024.03.06-19.40.51:609][655]UATHelper: Packaging (Android (ASTC)): LogCook: Display: Saved scl.csv D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/SpaceDevil/Metadata/PipelineCaches/ShaderStableInfo-Global-SF_VULKAN_ES31_ANDROID.shk for platform Android_ASTC, 31298 bytes
> [2024.03.06-19.40.51:609][655]UATHelper: Packaging (Android (ASTC)): LogCook: Display: Saved scl.csv D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-GAMENAME-SF_VULKAN_ES31_ANDROID.shk for platform Android_ASTC, 380422 bytes
> [2024.03.06-19.40.51:618][656]UATHelper: Packaging (Android (ASTC)): LogCook: Display: ---- Running UShaderPipelineCacheToolsCommandlet for platform Android_ASTC shader format SF_VULKAN_ES31_ANDROID
> [2024.03.06-19.40.51:618][656]UATHelper: Packaging (Android (ASTC)): LogCook: Display: With Args: build "D:/SYNC/Sync/UE_SS/Build/Android/PipelineCaches/*GAMENAME_SF_VULKAN_ES31_ANDROID.stablepc.csv" "D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-Global-SF_VULKAN_ES31_ANDROID.shk" "D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-GAMENAME-SF_VULKAN_ES31_ANDROID.shk" "D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Content/PipelineCaches/Android/GAMENAME_SF_VULKAN_ES31_ANDROID.stable.upipelinecache"
> [2024.03.06-19.40.51:618][656]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Sorting input stablepc.csv files into chronological order for merge processing...
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loading D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-GAMENAME-SF_VULKAN_ES31_ANDROID.shk...
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loading D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-Global-SF_VULKAN_ES31_ANDROID.shk...
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loaded 659 shader info lines from D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/SpaceDevil/Metadata/PipelineCaches/ShaderStableInfo-Global-SF_VULKAN_ES31_ANDROID.shk.
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loaded 13282 shader info lines from D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Metadata/PipelineCaches/ShaderStableInfo-GAMENAME-SF_VULKAN_ES31_ANDROID.shk.
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loaded 13941 unique shader info lines total.
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Loaded 275 stable PSO lines from D:/SYNC/Sync/UE_SS/Build/Android/PipelineCaches/SpaceDevil_SF_VULKAN_ES31_ANDROID.stablepc.csv.
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Re-deduplicated into 275 binary PSOs [Usage Mask Merged = 0].
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Running sanity check (consistency of vertex format).
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: 0 vertex shaders are used with an inconsistent vertex format
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: === Sanitizing results ===
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Before sanitization: .................................................................... 275 PSOs
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Filtered out due to inconsistent vertex declaration for the same vertex shader:.......... 0 PSOs
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Filtered out due to VS being possibly incompatible with an empty vertex declaration:..... 0 PSOs
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: -----
> [2024.03.06-19.40.51:696][665]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Number of PSOs after sanity checks:...................................................... 275 PSOs
> [2024.03.06-19.40.51:705][666]UATHelper: Packaging (Android (ASTC)): LogShaderPipelineCacheTools: Display: Wrote binary PSOs, (139KB) to D:/SYNC/Sync/UE_SS/Saved/Cooked/Android_ASTC/GAMENAME/Content/PipelineCaches/Android/GAMENAME_SF_VULKAN_ES31_ANDROID.stable.upipelinecache
> [2024.03.06-19.40.51:705][666]UATHelper: Packaging (Android (ASTC)): LogCook: Display: ---- Done running UShaderPipelineCacheToolsCommandlet for platform Android_ASTC
Unfortunately, I’m not able to post a log as I won’t be working on the project any time soon.
What I can tell is that the PSO were detected. It reduced lags. It still needed to see the objects once to have small stutters. But every game after that were perfectly smooth.
I was using the Unreal version of Oculus in the 4.27 branch.