diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-02 18:37:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-20 15:29:51 +0300 |
commit | cd44449578faa87c22776a0e8ecb792e18ed9a1b (patch) | |
tree | 8efe0a9d0e38365efc6078c0b1d77190286b617e /intern/cycles/render/scene.cpp | |
parent | b07c630676978498895f9e6d6c8cc00ad8215812 (diff) |
Cycles: Synchronize images after building mesh BVH
This way memory overhead caused by the BVH building is not so visible and peak
memory usage will be reduced.
Implementing this idea is not so straightforward actually, because we need to
synchronize images used for true displacement before meshes. Detecting whether
image is used for true displacement is not so striaghtforward, so for now all
all displacement types will synchronize images used for them.
Such change brings memory usage from 4.1G to 4.0G with the 01_01_01_D scene
from gooseberry. With 01_01_01_G scene it's 7.6G vs. 6.8G (before and after
the patch).
Reviewers: campbellbarton, juicyfruit, brecht
Subscribers: eyecandy
Differential Revision: https://developer.blender.org/D1217
Diffstat (limited to 'intern/cycles/render/scene.cpp')
-rw-r--r-- | intern/cycles/render/scene.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index 524574f096d..71741c0dfd1 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -160,11 +160,6 @@ void Scene::device_update(Device *device_, Progress& progress) if(progress.get_cancel() || device->have_error()) return; - progress.set_status("Updating Images"); - image_manager->device_update(device, &dscene, progress); - - if(progress.get_cancel() || device->have_error()) return; - progress.set_status("Updating Background"); background->device_update(device, &dscene, this); @@ -195,6 +190,11 @@ void Scene::device_update(Device *device_, Progress& progress) if(progress.get_cancel() || device->have_error()) return; + progress.set_status("Updating Images"); + image_manager->device_update(device, &dscene, progress); + + if(progress.get_cancel() || device->have_error()) return; + progress.set_status("Updating Camera Volume"); camera->device_update_volume(device, &dscene, this); |