I’m hitting this check in FD3D12DescriptorCache::SetSRVs:
check((CurrentDirtySlotMask & SlotsNeededMask) == 0);
It happens when FD3D12ShaderResourceViewCache::CleanSlots is called with SlotsNeeded equal to 64 (MAX_SRVS).
Since SRVSlotMask in ~(((ResourceSlotMask)1 << NumSlots) - 1) is 64 bit, NumSlots gets divided modulus 64 on the CPU, meaning the same mask is created for both 0 and 64, and when 64 is passed in, no slots are cleared.
The other functions work since they operate on indexes that top off at 63.
My local fix is to do this:
static inline void CleanSlots(ResourceSlotMask& SlotMask, uint32 NumSlots)
{
SlotMask &= (~(((ResourceSlotMask)1 << NumSlots) - 1)) + (NumSlots / MAX_SRVS);
}