diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-04-20 17:33:57 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-04-20 17:33:57 +0300 |
commit | 3d994b26ba9be0c89565a90b31598869383a22ab (patch) | |
tree | afab6a1dcd5d0ee6739b996bb2b3f472a43f27c7 /source/blender/draw/engines/eevee/eevee_effects.c | |
parent | fa7ddd0f43ea15dd19d81e7808de2bfe8cfc89ee (diff) |
EEVEE: Fix unreported memory leak when toggling AO on/off
The `filtered_radiance` is not a texture form the texture pool.
It needs manual freeing if not used.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_effects.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_effects.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index f4f7acb8862..3a38edecec6 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -171,7 +171,8 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, }); } else { - txl->filtered_radiance = NULL; + DRW_TEXTURE_FREE_SAFE(txl->filtered_radiance); + GPU_FRAMEBUFFER_FREE_SAFE(fbl->radiance_filtered_fb); } /** |