FLumenDirectLightingShadowMaskFromLightAttenuationWithLightFunctionCS PSO precaching miss

We’re seeing an expensive precaching miss for a permutation of the compute shader FLumenDirectLightingShadowMaskFromLightAttenuationWithLightFunctionCS. This is caused by a Spotlight with a Light Function material attached. Is there a way to precache these permutations?

[Attachment Removed]

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into these PSO Precaching misses for you.

Can you please send us a minimal test project that demonstrates this, and include the build command?

The guide for test projects:

[Content removed]

[Attachment Removed]

Hi Stephen,

Thanks!

I don’t think this is so much a bug report as much as a question. More directly, is there a mechanism to precache PSOs for compute shaders that extend from FMaterialShader? I don’t see one - like what FGlobalShader has for example - ShouldPrecachePermutation.

[Attachment Removed]

Thanks - i’ll give that a try

[Attachment Removed]

Hello,

Missing PSO Precaching functionality is a bug. We were unable to replicate it as described, which is why we ask for a test project.

You could try to work around it by adding a custom PSO collector, similar to how “FDeferredMobileLightMaterialPSOCollector” from MobileDeferredShadingPass.cpp works.

[Attachment Removed]