Commit: a48bd0db71dc322b6ccc6ccf491109a0dd0bce13
Author: Luca Rood
Date:   Mon Jun 26 18:16:05 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBa48bd0db71dc322b6ccc6ccf491109a0dd0bce13

Remove disabled code for freeing shaders on scene update

Some code for freeing shaders on scene updates (because of previous
dependency shaders had on lamps) had been disabled, as it is no longer
required. This removes that code altogether.

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

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 badcfee0533..2986ece028b 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -512,30 +512,12 @@ static void scene_changed(Main *bmain, Scene *scene)
 
        /* glsl */
        for (ob = bmain->object.first; ob; ob = ob->id.next) {
-#if 0 /* This was needed by old glsl where all lighting was statically linked 
into the shader. */
-               if (ob->gpulamp.first)
-                       GPU_lamp_free(ob);
-#endif
-               
                if (ob->mode & OB_MODE_TEXTURE_PAINT) {
                        BKE_texpaint_slots_refresh_object(scene, ob);
                        BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, 
NULL, NULL);
                        GPU_drawobject_free(ob->derivedFinal);
                }
        }
-
-#if 0 /* This was needed by old glsl where all lighting was statically linked 
into the shader. */
-       for (Material *ma = bmain->mat.first; ma; ma = ma->id.next)
-               if (ma->gpumaterial.first)
-                       GPU_material_free(&ma->gpumaterial);
-
-       for (World *wo = bmain->world.first; wo; wo = wo->id.next)
-               if (wo->gpumaterial.first)
-                       GPU_material_free(&wo->gpumaterial);
-       
-       if (defmaterial.gpumaterial.first)
-               GPU_material_free(&defmaterial.gpumaterial);
-#endif
 }
 
 void ED_render_id_flush_update(Main *bmain, ID *id)

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

Reply via email to