Advice on tracking down Untracked PSOs with Unknown mesh pass

Hi,

Our game has a lot of PSO Pecache misses due to untracked materials. We accumulate about ~80 when we load the main menu, and then we jump to ~300 when we open a simple level.

I’m having a hard time tracking down why the misses happen and I would appreciate your help.

An example of a log we see for all the materials:

PSO PRECACHING MISS:

Type: ShadersOnly

PSOPrecachingState: Untracked

Material: M_Lens

VertexFactoryType: FLocalVertexFactory

MDCStatsCategory: StaticMeshComponent

MeshPassName: Unknown

Shader Hashes:

VertexShader:    C51C596FA7075D189332D2FC939EE63AD33F9865

PixelShader:    CD1F16C70B30C434C55883CF335839FBBB27FFE2

Untracked Info:

\- MeshPassProcessor doesn't support PSO precaching.

And that pattern repeats for all materials:

  • Untracked in ShadersOnly (FullPSO and Minimal do not have any untracked counts)
  • MeshPassName is always unknown
  • Untracked info always says it’s the unsupported MeshPassProcessor, but I’m not sure which one

[Image Removed]

I tried:

  • breakpoint on M_Lens material with r.PSOPrecache.BreakOnMaterialName and see which specific passes get processed
    • for M_Lens, it’s CustomDepth, DepthPass, SecondStageDepthPass, LumenCardCapture, Velocity, WaterInfoTextureDepthPass, BasePass
  • breakpoint on UpdatePrecacheStats to try to find the mesh pass that’s breaking
    • PSOCollectorIndex is always -1 for the untracked materials, and I’m not sure what else could provide clues for the mesh pass in that area of code
  • stare at the Unreal Insights trace
    • M_Lens-related (I assume) PSO precache miss always comes around PostProcessing->DOF stage, but I’m not sure what to do about that information
    • I’m also not sure if this will help me with all the other 300 untracked materials

Do you have any insights on what else I could try to find out the reason for 300 untracked materials? I’ve attached a small snippet of Unreal Insights trace with two untracked materials from runtime in case that helps

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

Hi there,

Did you implement any custom mesh pass processors in your project? According to the logs, you are applying the material “M_Lens” to a static mesh that does not have PSO precaching enabled (I assume it’s missing FBasePassMeshProcessor::CollectPSOInitializers).

Here is a guide on how to add PSO precaching to your MPP: https://dev.epicgames.com/documentation/unreal\-engine/pso\-precaching\-for\-unreal\-engine\#f\-mesh\-pass\-processor

Otherwise, you might want to set a breakpoint on the data set for the Mesh Draw Command and check whether PSOCollectorIndex is equal to -1, since that would signal that a pass does not have a PSO precaching setup correctly. Set a conditional breakpoint at:

Around MeshPassProcessor.cpp:1574 (Condition: PSOCollectorIndex == -1)

DebugData.PSOCollectorIndex = PSOCollectorIndex; // break here when PSOCollectorIndex == INDEX_NONE

When it fires, the this pointer’s vtable in the watch window should point to the offending FMeshPassProcessor subclass. To filter to your specific draw, you can add Material && Material->GetAssetName() == FName(TEXT(“M_ZTZ99_Track”)) (or M_Lens) to the condition.

Let me know if anything is unclear or if you need extra details

[Attachment Removed]

Great, glad that could help! I will go ahead and close out the ticket then. If you have any other questions, please feel free to reach out to us again.

[Attachment Removed]

Thank you, that was exactly what I needed to track down which mesh processor was being used! It did end up being a custom mesh processor.

[Attachment Removed]