FidelityFX-FSR2 icon indicating copy to clipboard operation
FidelityFX-FSR2 copied to clipboard

FSR2 Stomps Memory in UE4

Open BleuBleu opened this issue 3 years ago • 0 comments

In UE4 4.27.1.

  1. Launch a the game using the editor, with stomp allocator (UE4Editor.exe <project> -game -stompmalloc)
  2. Make sure FSR2 is enabled obviously
  3. Modify a shader (ex: PostProcessFFX_FSR2CreateReactiveMask.usf)
  4. Recompile the shader (recompileshaders changed)
  5. You'll see the corruption in the allocator.

The issue seem to be due to the very hacky way shaders are swapped using class FFSR2ShaderMapContent. Since we dont use it, I just commented that whole thing out and it fixes the issue.

You should look for a cleaner way to swap shaders. Good luck.

-Mat

BleuBleu avatar Aug 31 '22 13:08 BleuBleu