Fix Cycles allocating result too early

When tiled rendering was used the render result was
allocated at the end of every view layer render as
opposite of an intended end of all rendering.

Modify the render_result_end so that it only ensures
pixels are allocated if pixels are actually copied
over.
This commit is contained in:
Sergey Sharybin
2022-01-05 17:07:34 +01:00
parent 5e7e571b0d
commit 3c04b44913

View File

@@ -435,8 +435,6 @@ void RE_engine_end_result(
return;
}
re_ensure_passes_allocated_thread_safe(re);
if (re->engine && (re->engine->flag & RE_ENGINE_HIGHLIGHT_TILES)) {
const HighlightedTile tile = highlighted_tile_from_result_get(re, result);
@@ -445,6 +443,7 @@ void RE_engine_end_result(
if (!cancel || merge_results) {
if (!(re->test_break(re->tbh) && (re->r.scemode & R_BUTS_PREVIEW))) {
re_ensure_passes_allocated_thread_safe(re);
render_result_merge(re->result, result);
}