Frontloading PSO Precacheing Requests && More info on Dynamic Shader Loading

Hi,

Sorry for the late reply - I was on holiday for a bit.

We don’t do anything special in FN. During startup all global compute and specific global graphics PSOs are compiled together with all the required PSOs for the menu. During level loading all the other PSOs are compiled. There is nothing level specific but everything works from component creation - so also happens during async level loading for example. After a component is created all the required PSOs are requested for compile during OnPostLoad. It needs to know a few things from the component but most importantly it needs to know what material (instance) and vertex factory combination is needed. On second runs it will request compile the same set of PSOs but it will be a lot faster because they are cached by the driver. If something changes like drivers, or different set of assets are loaded then PSO compilation will trigger again.

Can you give a bit more info on what you mean with dynamic shader loading? Are you talking about EPSOPrecacheMode::PreloadShader - this is used on consoles to make sure the shader are decompressed and ready for rendering. It ignores all the other PSO related state because that’s not important on consoles. It helps with micro hitches mostly on previous gen consoles.

Every client and process will request it’s own set of PSOs which it will need. Normally they should all be cached by the driver if they are the same then they should be compiled/retrieved fast enough. I guess if the user cache is used then all previously requested PSOs will be compiled during the next boot as well, but I don’t know all the details about the shader pipeline cache. Can you give a bit more details on the steps you are taking here and perhaps share a few insight traces to better see what’s going on.

Cheers,

Kenzo