Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/session.cpp
| Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | RenderWork Session::run_update_for_next_iteration() | ||||
| RenderWork render_work; | RenderWork render_work; | ||||
| thread_scoped_lock scene_lock(scene->mutex); | thread_scoped_lock scene_lock(scene->mutex); | ||||
| thread_scoped_lock reset_lock(delayed_reset_.mutex); | thread_scoped_lock reset_lock(delayed_reset_.mutex); | ||||
| bool have_tiles = true; | bool have_tiles = true; | ||||
| bool switched_to_new_tile = false; | bool switched_to_new_tile = false; | ||||
| const bool did_reset = delayed_reset_.do_reset; | |||||
| if (delayed_reset_.do_reset) { | if (delayed_reset_.do_reset) { | ||||
| thread_scoped_lock buffers_lock(buffers_mutex_); | thread_scoped_lock buffers_lock(buffers_mutex_); | ||||
| do_delayed_reset(); | do_delayed_reset(); | ||||
| /* After reset make sure the tile manager is at the first big tile. */ | /* After reset make sure the tile manager is at the first big tile. */ | ||||
| have_tiles = tile_manager_.next(); | have_tiles = tile_manager_.next(); | ||||
| switched_to_new_tile = true; | switched_to_new_tile = true; | ||||
| } | } | ||||
| /* Update number of samples in the integrator. | /* Update number of samples in the integrator. | ||||
| * Ideally this would need to happen once in `Session::set_samples()`, but the issue there is | * 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. */ | * 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); | scene->integrator->set_aa_samples(params.samples); | ||||
| } | |||||
| /* Update denoiser settings. */ | /* Update denoiser settings. */ | ||||
| { | { | ||||
| const DenoiseParams denoise_params = scene->integrator->get_denoise_params(); | const DenoiseParams denoise_params = scene->integrator->get_denoise_params(); | ||||
| path_trace_->set_denoiser_params(denoise_params); | path_trace_->set_denoiser_params(denoise_params); | ||||
| } | } | ||||
| /* Update adaptive sampling. */ | /* Update adaptive sampling. */ | ||||
| ▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines | |||||