Fix T73921: Eevee volume render test memory leak in Mantaflow

Fixed memory leak that showed up after the original issue (crash) had been fixed in 93ac4709eb. The fix ensures that light cache bakes free up GPU smoke textures and the smoke domain list correctly.

This commit also removes the workaround (f3a33a9298) that disabled light cache bakes for fluid objects.
This commit is contained in:
Sebastián Barschkis 2020-03-14 00:30:55 +01:00
parent 7d56c425f8
commit 5260aaf3b1
Notes: blender-bot 2023-02-14 11:25:11 +01:00
Referenced by commit 0b86943641, Fix T74901: Smoke Simulation crashes on eevee and is not persistent on Cycles
Referenced by issue #74901, Smoke Simulation crashes on eevee and is not persistent on Cycles
Referenced by issue #73921, Eevee volume render test memory leak in Mantaflow
3 changed files with 3 additions and 11 deletions

View File

@ -777,6 +777,8 @@ static void eevee_lightbake_delete_resources(EEVEE_LightBake *lbake)
if (!lbake->resource_only) {
BLI_mutex_unlock(lbake->mutex);
}
EEVEE_volumes_free_smoke_textures();
}
/* Cache as in draw cache not light cache. */

View File

@ -178,8 +178,6 @@ void EEVEE_volumes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
const float *viewport_size = DRW_viewport_size_get();
BLI_listbase_clear(&e_data.smoke_domains);
const int tile_size = scene_eval->eevee.volumetric_tile_size;
/* Find Froxel Texture resolution. */

View File

@ -35,13 +35,6 @@ def setup():
# mat.use_screen_refraction = True
mat.use_sss_translucency = True
# Workaround for crash with Mantaflow (T73921).
use_light_cache_bake = True
for ob in bpy.data.objects:
for mod in ob.modifiers:
if mod.type == 'FLUID':
use_light_cache_bake = False
cubemap = None
grid = None
# Does not work in edit mode
@ -86,8 +79,7 @@ def setup():
eevee.gi_visibility_resolution = '16'
eevee.gi_irradiance_smoothing = 0
if use_light_cache_bake:
bpy.ops.scene.light_cache_bake()
bpy.ops.scene.light_cache_bake()
# When run from inside Blender, render and exit.