Vulkan logPSO not working

Hey,

in Unreal 5.4 we logged the pso shader files with -logpso and followed the “Creating a Bundled PSO Cache” documentation. Since we moved to Unreal 5.5 it stopped working and we are wondering why. Was there any change to the process? Is there a way to figure out where the process fails?

We are using Vulkan as our RHI.

All the best

Flo

1 Like

Hello there,

It appears that Vulkan RHIs no longer enable PSO FileCache (the bundled system) when PSO Precaching is active. This can be changed by setting r.Vulkan.EnablePSOFileCacheWhenPrecachingActive to true.

I hope that helps.

Best regards,

Chris

Hi,

thank you for the response. I tried this setting already, but I was getting a different file format, will check again.

Do I also need these:

r.Vulkan.UseChunkedPSOCache = 1

r.Vulkan.AllowPSOPrecaching = 1

Best regards,

Flo

I checked again, the only file that gets written out with these settings is RHICache\Vulkan\SF_VULKAN_SM5.a5b61d75.10de.2560\VulkanPSOChunks.

Thank you, we got it working this way

I have r.Vulkan.EnablePSOFileCacheWhenPrecachingActive=True and r.ShaderPipelineCache.SaveBoundPSOLog=True in my DefaultEngine.ini and I’m testing in a packaged build, so it should open the FileCache and automatically begin to log PSOs. With those two settings and a packaged build, I am seeing an SF_VULKAN upipelinecache.

I don’t have the chunked PSO cache on, but I’m not seeing anything in the code that should interfere with the file cache. It shouldn’t be required for bundled PSO collection, though.

Precaching is the other PSO system. It attempts to preempt the use of PSOs and precompile the PSO on the fly before use. This generally kicks off requests in PostLoad, so you may want to let assets load before rendering them if you wish to minimise hitch potential from dynamically spawned objects.

It’s not needed for FileCache, but they can work together safely. If you want to rely on Precaching more than Filecache, you can specify r.ShaderPipelineCache.ExcludePrecachePSO=1 so the Filecache only contains PSOs that Precache system missed.

If you want to read more about the two PSO systems and their usages, I’ve listed a few prior cases that may be of interest.

[Content removed]

[Content removed]

[Content removed]

[Content removed]

Best regards,

Chris

1 Like

Fantastic news!

If you have any further questions, please don’t hesitate to ask. Otherwise, would you mind if I close this case for now?

Best regards,

Chris

Hey!! You seem to know a lot about these systems.

I’m just going to ask a question about it on top of what was already resolved.

I’m developing on UE 5.5.1 Meta Fork v74.1 for Quest Devices using Vulkan Android. The game is large and would not fit into a single OBB file so we had to split it into 10 chunks and it is being distributed into several OBB files.

I got both the Bundled PSO and the PSO Precaching systems enabled, which I can verify in the packaged game logs with the line LogVulkanRHI: Vulkan PSO Precaching = 1, PipelineFileCache = 1, then there’s a line that says the Bundled PSO system opens the file with the collected PSOsOpened FPipelineCacheFile: ../../.. with *X* entries, but it also fails to open a “.stable.upipelinecache” file for each of the chunks.

The thing is that I’m still getting some of the hitches that I made sure to collect on my bundled PSOs. So I did a small test forcing the build to package a single OBB file without chunks, this was the only way in which I could get rid of the stutter. As a matter of fact and curiously enough, the hitch was also removed when I used that very same PSO file when I added back all the chunks. That is not replicable for the entire project, however, since I had to reduce the textures a lot and prevent a bunch of levels from cooking.

I then came across the CVar called r.Vulkan.UseChunkedPSOCache, so I’m going to test it around but I do wonder what it really does since the Engine sourcecode doesn’t explain anything about what it really does.

Do you know what else could be happening? I’d really appreciate the help