Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/integrator/render_scheduler.cpp')
-rw-r--r--intern/cycles/integrator/render_scheduler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/integrator/render_scheduler.cpp b/intern/cycles/integrator/render_scheduler.cpp
index a75662c90d8..ebc3170393f 100644
--- a/intern/cycles/integrator/render_scheduler.cpp
+++ b/intern/cycles/integrator/render_scheduler.cpp
@@ -750,6 +750,11 @@ double RenderScheduler::guess_display_update_interval_in_seconds_for_num_samples
int RenderScheduler::calculate_num_samples_per_update() const
{
const double time_per_sample_average = path_trace_time_.get_average();
+ /* Fall back to 1 sample if we have not recorded a time yet. */
+ if (time_per_sample_average == 0.0) {
+ return 1;
+ }
+
const double num_samples_in_second = pixel_size_ * pixel_size_ / time_per_sample_average;
const double update_interval_in_seconds = guess_display_update_interval_in_seconds();