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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-07-20 17:13:08 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-20 18:48:36 +0300
commitdfcb568c165913a15679f6b55b0b76e49a747a2e (patch)
tree548a0e39e6e22020be213a7fa6311e0d5f3d1901 /source/blender/blenkernel/intern/world.c
parent177a8f6dab191db2756cc247565458b07d5b6005 (diff)
Fix T51925: Eevee: Animated Eevee values slowdown
Move material update from RNA callback to dependency graph.
Diffstat (limited to 'source/blender/blenkernel/intern/world.c')
-rw-r--r--source/blender/blenkernel/intern/world.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 363c36e644d..2adbdc83a36 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -175,3 +175,14 @@ void BKE_world_make_local(Main *bmain, World *wrld, const bool lib_local)
{
BKE_id_make_local_generic(bmain, &wrld->id, true, lib_local);
}
+
+void BKE_world_eval(struct EvaluationContext *UNUSED(eval_ctx), World *world)
+{
+ if (G.debug & G_DEBUG_DEPSGRAPH) {
+ printf("%s on %s (%p)\n", __func__, world->id.name, world);
+ }
+ if (!BLI_listbase_is_empty(&world->gpumaterial)) {
+ world->update_flag = 1;
+ GPU_material_uniform_buffer_tag_dirty(&world->gpumaterial);
+ }
+}