Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-06-23 17:41:44 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-23 17:41:56 +0300
commit986a3d15ac68545a9886d20f73376f818c28531a (patch)
treec8d36afa0d90b6eed92fde4f4bd1d3a8abd6245e /source/blender/editors/render/render_update.c
parent45720922f7b927865b9b63f31c9d2a0b3d4b753e (diff)
GPUMaterial: Avoid freeing GLSL shaders when changing scene properties.
This was causing major slowdown when changing Colormanagment settings or post processing.
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r--source/blender/editors/render/render_update.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 74bb4c570e6..fd8b3375c19 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -519,8 +519,10 @@ 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);
@@ -529,6 +531,7 @@ static void scene_changed(Main *bmain, Scene *scene)
}
}
+#if 0 /* This was needed by old glsl where all lighting was statically linked into the shader. */
for (ma = bmain->mat.first; ma; ma = ma->id.next)
if (ma->gpumaterial.first)
GPU_material_free(&ma->gpumaterial);
@@ -539,6 +542,7 @@ static void scene_changed(Main *bmain, Scene *scene)
if (defmaterial.gpumaterial.first)
GPU_material_free(&defmaterial.gpumaterial);
+#endif
}
void ED_render_id_flush_update(Main *bmain, ID *id)