No need to free all the shaders when appending or reloading libraries

To recompile all the shaders is expensive. And something to be avoided at all costs.

It was needed before because for every new lamp in the file we needed to
recompile the shaders. Now this is no longer required since we are using
UBOs for the sahders.
This commit is contained in:
Dalai Felinto 2017-06-29 19:05:26 +02:00
parent 2c62493891
commit 98c8b5a6fb
1 changed files with 0 additions and 6 deletions

View File

@ -504,9 +504,6 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* recreate dependency graph to include new objects */
DEG_scene_relations_rebuild(bmain, scene);
/* free gpu materials, some materials depend on existing objects, such as lamps so freeing correctly refreshes */
GPU_materials_free();
/* XXX TODO: align G.lib with other directory storage (like last opened image etc...) */
BLI_strncpy(G.lib, root, FILE_MAX);
@ -802,9 +799,6 @@ static void lib_relocate_do(
/* recreate dependency graph to include new objects */
DEG_scene_relations_rebuild(bmain, scene);
/* free gpu materials, some materials depend on existing objects, such as lamps so freeing correctly refreshes */
GPU_materials_free();
}
void WM_lib_reload(Library *lib, bContext *C, ReportList *reports)