GPUOpen-Effects / FidelityFX-FSR2

FidelityFX Super Resolution 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FSR2 memory leak in UE5.1

bonorumetmalorum opened this issue · comments

Hello!

Having recently integrated FSR2 for UE 5.1 we noticed that our memory usage was slowly climbing over the runtime of our game. Please find attached the various captures we made using Insights and LLM whilst diagnosing this problem. We found a fix to this which was to add the following lines to both, FSR2TemporalUpscalingD3D12.cpp:156 and FSR2TemporalUpscalingVulkan.cpp:113 in the function named ForceUAVTransition:

FRHITransition* ConstFreeTransition = const_cast<FRHITransition*>(Transition);
RHIReleaseTransition(ConstFreeTransition);
FConcurrentLinearAllocator::Free(ConstFreeTransition);

It would appear that the issue was this transition was not being deleted properly due to EndTransition not being called and freeing the memory in the linear allocator.

Thanks,

Govind Venkatesh and David Smith :)