SiliconStudio / xenko

Old repo for Xenko Game Engine. Please use https://github.com/xenko3d/xenko instead.
http://xenko.com
1.54k stars 343 forks source link

Memory leak cause by MSAAResolver in ForwardRenderer #593

Open matmuze opened 7 years ago

matmuze commented 7 years ago

Hello,

I noticed that there is a memory leak when using the ForwardRenderer with PostEffects and MSAA.

The origin of the leak is caused by the MSAAResolver being used twice in this particular use case (MSAA in forward mode with post effects requires resolving the color target and the depth).

I don't really know what is causing the leak precisely but I managed to solve it by using two separate MSAAResolver instead.

Cheers, Mat.

sinkingsugar commented 7 years ago

We noticed some memory leaks when changing properties in the GraphicsCompositor, for now the solution is to close and open again the game studio if you edit that asset a lot. Sorry for the inconvenience. We will work on a fix.

matmuze commented 7 years ago

Im pretty sure its due to the MSAAResolver mate, I did a few tests and I got the same problem without even changing the compositor, just editing code. Use the same MSAAResolver once -> fine Use the same MSAAResolver twice -> leak