blender/intern/cycles
Sergey Sharybin c5d7ea091f Changes to partial update during rendering
Summary:
Mainly addressed to solve old TODO with color managed fallback
to CPU mode when displaying render result during rendering.

That fallback was caused by the fact that partial image update
was always acquiring image buffer for composite output and was
only modifying display buffer directly.

This was a big issue for Cycles rendering which renders layers
one by one and wanted to display progress of each individual
layer. This lead to situations when display buffer was based on
what Cycles passes via RenderResult and didn't take layer/pass
from image editor header into account.

Now made it so image buffer which partial update is operating
with always corresponds to what is set in image editor header.

To make Cycles displaying progress of all the layers one by one
made it so image_rect_update switches image editor user to
newly rendering render layer. It happens only once when render
engine starts rendering next render layer, so should not be
annoying for navigation during rendering.

Additional change to render engines was done to make it so
they're able to merge composite output to final result
without marking tile as done. This is done via do_merge_result
argument to end_result() callback. This argument is optional
so should not break script compatibility.

Additional changes:

- Partial display update for Blender Internal now happens from
  the same thread as tile rendering. This makes it so display
  conversion (which could be pretty heavy actually) is done in
  separate threads. Also gives better UI feedback when rendering
  easy scene with small tiles.

- Avoid freeing/allocating byte buffer for render result
  if it's owned by the image buffer. Only mark it as invalid
  for color management.

  Saves loads of buffer re-allocations in cases when having
  several image editors opened with render result. This change
  in conjunction with the rest of the patch gave around
  50%-100% speedup of render time when displaying non-combined
  pass during rendering on my laptop.

- Partial display buffer update was wrong for buffers with number
  of channels different from 4.

- Remove unused window from RenderJob.

- Made image_buffer_rect_update static since it's only used
  in single file.

Reviewers: brecht

Reviewed By: brecht

CC: dingto

Differential Revision: http://developer.blender.org/D98
2013-12-17 23:42:38 +06:00
..
app Fix T37827: cycles XML mesh export utility not longer worked. 2013-12-16 11:08:41 +01:00
blender Changes to partial update during rendering 2013-12-17 23:42:38 +06:00
bvh spelling: use American spelling for canceled 2013-10-26 01:06:19 +00:00
cmake Cycles / Standalone: 2013-08-30 17:34:27 +00:00
device Cycles / OpenCL: Fix compile error on OS X 2013-12-17 09:59:18 +01:00
doc Cycles: relicense GNU GPL source code to Apache version 2.0. 2013-08-18 14:16:15 +00:00
kernel Fix T37264: cycles CPU render had limited number of float images, bumped to 1024. 2013-12-14 15:07:46 +01:00
render Fix T37264: cycles CPU render had limited number of float images, bumped to 1024. 2013-12-14 15:07:46 +01:00
subd Cycles: experimental OpenSubdiv code. 2013-11-28 02:11:42 +01:00
util Cycles: CUDA runtime kernel compilation can now find CUDA 6.0. 2013-12-13 19:12:07 +01:00
CMakeLists.txt Cycles: experimental OpenSubdiv code. 2013-11-28 02:11:42 +01:00
SConscript Cycles: test code for sse 4.1 kernel and alignment for some vector types. 2013-11-22 14:42:41 +01:00