Assert in Minimal Bindless with PSO Precaching

Hi Epic and all,

we’re trying to enable Minimal Bindless, but run into this assert:

Assertion failed: IsCompatibleWithBindlessResources*(ShaderPair.Data) [D3D12Util.cpp]*

DefaultPostProcessMaterial_f4d794b6891457c4/Default/TGPUSkinVertexFactoryDefault/TVirtualTextureVSBaseColorNormalRoughness/0:/Engine/Private/VirtualTextureMaterial.usf|MainVS doesn’t support binding with stages that use dynamic resources

With r.Shaders.ExtraData=1 we can see the names, but they might be de-duplicated, so I hope it isn’t a red herring. What’s sure, is that the bindless-ness doesn’t match the other stages when using PSO PreCaching (check the callstack).

I added logging before the compatibility check. The failing FBoundShaderStateInput contains:

VS:

UsesBindlessResources=0

UsesBindlessSamplers=0

NumSRVs=4 or 5

NumUAVs=0

UsageFlags=0x00000000

PS:

UsesBindlessResources=1

UsesBindlessSamplers=1

NumSRVs=0 // !

NumUAVs=0

UsageFlags=0x00000006

This makes the graphics PSO/root signature invalid under Minimal bindless, because one stage requires directly indexed heaps, while another stage still has bindful SRV bindings.

It doesn’t manifest under BindlessConfiguration=All or Disabled. Not sure exactly why, yet.

With r.PSOPrecaching=0 we don’t see the assert, but that is not a fix.

Would this make sense to any of your engineers? Checking the code in main line / 5.8 shows it might not be fixed yet.

Many thanks, Pavel

Best regards, Pavel

[Attachment Removed]

Steps to Reproduce
A tricky repro.

  • BindlessConfiguration=Minimal
  • r.PSOPrecaching=1

Cook. Run and observe that at boot, we assert in FD3D12Adapter::GetRootSignature

Reproduced on 5.7.4, D3D12, SM6, Runtime Virtual Texture content, spline/skinned mesh vertex factories.

[Attachment Removed]

Hello! Generally, the bindless system is still a WIP, so it’s expected that there are some inconsistencies with the PSO precaching system. Would you mind sharing the exact project where you ran into this issue? I would assume it’s easy to hit, but it would just help us stay consistent. Thanks!

[Attachment Removed]

Ok, no worries. Let me know if you manage to reproduce the issue more reliably. Just note that we will be going on summer break in a week, so in case you don’t hear from me right away, know I will get to it when we return

[Attachment Removed]

Hi Tim. I’m trying to repro this in vanilla but it will take me some time. In the meantime, I’m opening another ticket for a specific console issue which I can’t mention here.

[Attachment Removed]