[Bf-blender-cvs] [771eef6d828] cycles-x: Fix wrong tile briefly showing on tiled render cancel in Cycles X
Sergey Sharybin
noreply at git.blender.org
Tue Sep 7 15:38:12 CEST 2021
Commit: 771eef6d828b0b88830edbf25559006619f9b8b7
Author: Sergey Sharybin
Date: Tue Sep 7 14:10:15 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB771eef6d828b0b88830edbf25559006619f9b8b7
Fix wrong tile briefly showing on tiled render cancel in Cycles X
Don't update GPUDisplay if there is nothing to be written for the
current tile. Avoids render buffer from previous tile used for the
cancelled tile.
===================================================================
M intern/cycles/integrator/render_scheduler.cpp
===================================================================
diff --git a/intern/cycles/integrator/render_scheduler.cpp b/intern/cycles/integrator/render_scheduler.cpp
index d80c163ec09..9ef8a795afb 100644
--- a/intern/cycles/integrator/render_scheduler.cpp
+++ b/intern/cycles/integrator/render_scheduler.cpp
@@ -229,15 +229,24 @@ void RenderScheduler::render_work_reschedule_on_cancel(RenderWork &render_work)
render_work = RenderWork();
+ const bool has_rendered_samples = get_num_rendered_samples() != 0;
+
/* Do not write tile if it has zero samples it it, treat it similarly to all other tiles which
* got cancelled. */
- if (!state_.tile_result_was_written && get_num_rendered_samples() != 0) {
+ if (!state_.tile_result_was_written && has_rendered_samples) {
render_work.tile.write = true;
- render_work.update_display = true;
}
if (!state_.full_frame_was_written) {
render_work.full.write = true;
+ }
+
+ /* Update current tile, but only if any sample was rendered.
+ * Allows to have latest state of tile visible while full buffer is being processed.
+ *
+ * Note that if there are no samples in the current tile its render buffer might have pixels
+ * remained from previous state. */
+ if (has_rendered_samples) {
render_work.update_display = true;
}
}
More information about the Bf-blender-cvs
mailing list