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>2012-11-09 12:46:53 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-09 12:46:53 +0400
commit76525d53982dc783d9f1bf33223e0e7a2b412c60 (patch)
tree87d7c753daf11cefe166f79bb096a9e1d206074c /intern/cycles/render/scene.h
parenteff734203ff7a0f4a4f97015c9f1f59632c75abf (diff)
Cycles: persistent images option
This option enables keeping loaded images in the memory in-between of rendering. Implemented by keeping render engine alive for until Render structure is being freed. Cycles will free all data when render finishes, optionally keeping image manager untouched. All shaders, meshes, objects will be re-allocated next time rendering happens. Cycles cession and scene will be re-created from scratch if render/ scene parameters were changed. This will also allow to keep compiled OSL shaders in memory without need to re-compile them again. P.S. Performance panel could be cleaned up a bit, not so much happy with it's vertical alignment currently but not sure how to make it look better. P.P.S. Currently the only way to free images from the device is to disable Persistent Images option and start rendering.
Diffstat (limited to 'intern/cycles/render/scene.h')
-rw-r--r--intern/cycles/render/scene.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index bd45c1c04e6..92ef692b4b9 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -120,6 +120,7 @@ public:
bool use_bvh_cache;
bool use_bvh_spatial_split;
bool use_qbvh;
+ bool persistent_images;
SceneParams()
{
@@ -139,7 +140,8 @@ public:
&& bvh_type == params.bvh_type
&& use_bvh_cache == params.use_bvh_cache
&& use_bvh_spatial_split == params.use_bvh_spatial_split
- && use_qbvh == params.use_qbvh); }
+ && use_qbvh == params.use_qbvh
+ && persistent_images == params.persistent_images); }
};
/* Scene */
@@ -198,6 +200,12 @@ public:
bool need_update();
bool need_reset();
+
+ void reset();
+ void device_free();
+
+protected:
+ void free_memory(bool final);
};
CCL_NAMESPACE_END