[Bf-blender-cvs] [2c62493891a] blender2.8: Eevee: No need to free all the gpu materials when world changes.

Dalai Felinto noreply at git.blender.org
Thu Jun 29 18:57:18 CEST 2017


Commit: 2c62493891ae46af3c3c4b5475412127d0641c8e
Author: Dalai Felinto
Date:   Thu Jun 29 18:56:38 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB2c62493891ae46af3c3c4b5475412127d0641c8e

Eevee: No need to free all the gpu materials when world changes.

We have a world probe that is used to prevent exactly that.

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

M	source/blender/editors/render/render_update.c

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

diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 2986ece028b..42d914b1a71 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -471,10 +471,8 @@ static void texture_changed(Main *bmain, Tex *tex)
 	}
 }
 
-static void world_changed(Main *bmain, World *wo)
+static void world_changed(Main *UNUSED(bmain), World *wo)
 {
-	Material *ma;
-
 	/* icons */
 	BKE_icon_changed(BKE_icon_id_ensure(&wo->id));
 
@@ -482,10 +480,6 @@ static void world_changed(Main *bmain, World *wo)
 	wo->update_flag = 1;
 	
 	/* glsl */
-	for (ma = bmain->mat.first; ma; ma = ma->id.next)
-		if (ma->gpumaterial.first)
-			GPU_material_free(&ma->gpumaterial);
-
 	if (defmaterial.gpumaterial.first)
 		GPU_material_free(&defmaterial.gpumaterial);




More information about the Bf-blender-cvs mailing list