[Bf-blender-cvs] [4068b6b5a71] master: Fix T91598: Decreasing sample count causes viewport to reset
Sergey Sharybin
noreply at git.blender.org
Wed Sep 22 18:09:12 CEST 2021
Commit: 4068b6b5a7112647f4efe4f7df0ee3c6399a1b2d
Author: Sergey Sharybin
Date: Wed Sep 22 18:00:39 2021 +0200
Branches: master
https://developer.blender.org/rB4068b6b5a7112647f4efe4f7df0ee3c6399a1b2d
Fix T91598: Decreasing sample count causes viewport to reset
Differential Revision: https://developer.blender.org/D12601
===================================================================
M intern/cycles/render/session.cpp
===================================================================
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 0539e02a8d5..823c34ed519 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -261,6 +261,7 @@ RenderWork Session::run_update_for_next_iteration()
bool have_tiles = true;
bool switched_to_new_tile = false;
+ const bool did_reset = delayed_reset_.do_reset;
if (delayed_reset_.do_reset) {
thread_scoped_lock buffers_lock(buffers_mutex_);
do_delayed_reset();
@@ -272,8 +273,12 @@ RenderWork Session::run_update_for_next_iteration()
/* Update number of samples in the integrator.
* Ideally this would need to happen once in `Session::set_samples()`, but the issue there is
- * the initial configuration when Session is created where the `set_samples()` is not used. */
- scene->integrator->set_aa_samples(params.samples);
+ * the initial configuration when Session is created where the `set_samples()` is not used.
+ *
+ * NOTE: Unless reset was requested only allow increasing number of samples. */
+ if (did_reset || scene->integrator->get_aa_samples() < params.samples) {
+ scene->integrator->set_aa_samples(params.samples);
+ }
/* Update denoiser settings. */
{
More information about the Bf-blender-cvs
mailing list