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.
This commit is contained in:
Sergey Sharybin
2012-11-09 08:46:53 +00:00
parent eff734203f
commit 76525d5398
16 changed files with 214 additions and 36 deletions

View File

@@ -130,6 +130,7 @@ public:
void set_samples(int samples);
void set_pause(bool pause);
void device_free();
protected:
struct DelayedReset {
thread_mutex mutex;