Commit: 39706a0a3df552b2d6759cc12c07b6af59269649
Author: Clément Foucault
Date:   Fri Feb 2 23:59:57 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB39706a0a3df552b2d6759cc12c07b6af59269649

Eevee: Subsurface: Release separate albedo texture if not used.

===================================================================

M       source/blender/draw/engines/eevee/eevee_subsurface.c

===================================================================

diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c 
b/source/blender/draw/engines/eevee/eevee_subsurface.c
index 4ca1f0f42a1..3396c82501c 100644
--- a/source/blender/draw/engines/eevee/eevee_subsurface.c
+++ b/source/blender/draw/engines/eevee/eevee_subsurface.c
@@ -102,7 +102,10 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, 
EEVEE_Data *vedata)
                        txl->sss_albedo = 
DRW_texture_create_2D((int)viewport_size[0], (int)viewport_size[1],
                                                                
DRW_TEX_RGB_11_11_10, 0, NULL);
                }
-
+               else {
+                       /* Cleanup to release memory */
+                       DRW_TEXTURE_FREE_SAFE(txl->sss_albedo);
+               }
                return EFFECT_SSS;
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to