Corrupted previous bone data when using r.gtsynctype 1 and r.oneFrameThreadLag 1

We recently moved to 5.6 and we are facing the following issue.

When using the following rhi/render thread/GT sync configuration

  • r.oneFrameThreadLag 1
  • r.GTSyncType 1

The previous skinning bone data are corrupted and introduce visual artefacts on everything using motion vectors, motion blur being the most visible.

After debugging, I found out that the issue was coming from SupportsNoOverwriteBuffers()

in GPUSkinVertexFactory called in AllocateBoneBuffer (for previous frame).

On PS5, we use r.GTSyncType 2 but the issue is also reproducible with a value of 1. On both platforms r.oneFrameThreadLag 0 fixes the issues as well as r.GTSyncType 0.

My current workaround would be to use r.GTSyncType 0 on PC instead of oneframelag to 0 to have better performance.

I am still trying to understand what is causing the wrong data. Attaching PIX makes the bug non-reproducible which would confirm a sync issue somewhere.

Please also note that it was introduced in our 5.6 update by the parallel RHI command translate. Disabling the parallel translate fixes it but we obviously lose one of the biggest 5.6 update

Thanks

It’s odd to me that it’s not respecting the number of safe frames with those sync types. I tested that pretty thoroughly on our own content. But maybe yours is exposing some edge case. You can work around this by just disabling SupportsNoOverwriteBuffers in the GPU skin vertex factory. It’s a small optimization that avoids versioning the bone buffers every frame but it’s not critical.

hello, thanks for the feedback. I will implement your suggestion. Thanks.