Cycles: progressive refine option

Just makes progressive refine :)

This means the whole image would be refined gradually using as much
threads as it's set in performance settings. Having enough tiles is
required to have this option working as it's expected.

Technically it's implemented by repeatedly computing next sample for
all the tiles before switching to next sample.

This works around 7-12% slower than regular tile-based rendering, so
use this option only if you really need it.

This commit also fixes progressive update of image when Save Buffers
option is enabled.

And one more thing this commit fixes is handling display buffer with
Save Buffers option enabled. If this option is enabled image buffer
wouldn't have neither byte nor float buffer until image is fully
rendered which could backfire in missing image while rendering in
cases color management cache became full.

This issue solved by allocating byte buffer for image buffer from
tile update callback.

Patch was reviewed by Brecht. He also made some minor edits to
original version to patch. Thanks, man!
This commit is contained in:
Sergey Sharybin
2012-10-13 12:38:32 +00:00
parent 51105bb2bd
commit 3b88a29abf
18 changed files with 158 additions and 36 deletions

View File

@@ -25,6 +25,7 @@
#include "util_progress.h"
#include "util_thread.h"
#include "util_vector.h"
CCL_NAMESPACE_BEGIN
@@ -42,6 +43,7 @@ class SessionParams {
public:
DeviceInfo device;
bool background;
bool progressive_refine;
string output_path;
bool progressive;
@@ -58,6 +60,7 @@ public:
SessionParams()
{
background = false;
progressive_refine = false;
output_path = "";
progressive = false;
@@ -76,6 +79,7 @@ public:
{ return !(device.type == params.device.type
&& device.id == params.device.id
&& background == params.background
&& progressive_refine == params.progressive_refine
&& output_path == params.output_path
/* && samples == params.samples */
&& progressive == params.progressive
@@ -173,6 +177,11 @@ protected:
double reset_time;
double preview_time;
double paused_time;
/* progressive refine */
bool update_progressive_refine(bool cancel);
vector<RenderBuffers *> tile_buffers;
};
CCL_NAMESPACE_END