Blender Git Loki

Git Commits -> Revision c5d7ea0

Revision c5d7ea0 by Sergey Sharybin (master)
December 17, 2013, 17:42 (GMT)
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: https://developer.blender.org/D98

Commit Details:

Full Hash: c5d7ea091fa5a291b270565e456612df1e37b50c
Parent Commit: 04eb24a
Lines Changed: +265, -122

16 Modified Paths:

/intern/cycles/blender/blender_session.cpp (+6, -6) (Diff)
/source/blender/blenkernel/intern/image.c (+1, -6) (Diff)
/source/blender/editors/render/render_intern.h (+2, -4) (Diff)
/source/blender/editors/render/render_internal.c (+160, -30) (Diff)
/source/blender/editors/render/render_preview.c (+2, -2) (Diff)
/source/blender/editors/render/render_view.c (+4, -2) (Diff)
/source/blender/editors/screen/glutil.c (+0, -33) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+44, -6) (Diff)
/source/blender/makesrna/intern/rna_render.c (+2, -1) (Diff)
/source/blender/render/extern/include/RE_engine.h (+1, -1) (Diff)
/source/blender/render/extern/include/RE_pipeline.h (+1, -1) (Diff)
/source/blender/render/intern/include/render_types.h (+2, -2) (Diff)
/source/blender/render/intern/source/envmap.c (+2, -2) (Diff)
/source/blender/render/intern/source/external_engine.c (+5, -3) (Diff)
/source/blender/render/intern/source/pipeline.c (+32, -22) (Diff)
/source/blender/render/intern/source/rendercore.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021