Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Private
evgenii babinets b2a6f3b688 Another attempt at fixing a GameThread stall (waiting for render thread) whenever a CVar is changed during gameplay.
Last attempt failed some editor tests since those tests construct buffers with bNeedsCpuAccess = false even though editors must keep all resources. Changing the condition for freeing the resource object to see if its array was freed directly.

Original description:

It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).

#rb jordan.cristiano
#preflight 620529984c6c33118fa6fdc7

[CL 18937113 by evgenii babinets in ue5-main branch]
2022-02-10 11:26:38 -05:00
..