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:
authorBrecht Van Lommel <brecht@blender.org>2021-11-16 22:44:31 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-16 22:49:32 +0300
commitcfd0e96e47ed34888077b989854ba5a557bac43b (patch)
tree0afe6d7a14af81482266ba581336143c61f57fc6 /intern/cycles/util
parent7293c1b3578e015a00e8b1e282baa62f51c5b4c4 (diff)
Fix T93125: Cycles wrong remaining render time with high number of samples
Avoid integer overflow.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/progress.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/progress.h b/intern/cycles/util/progress.h
index 4b0ff08aa7e..f2d80e49ab8 100644
--- a/intern/cycles/util/progress.h
+++ b/intern/cycles/util/progress.h
@@ -200,12 +200,12 @@ class Progress {
total_pixel_samples = total_pixel_samples_;
}
- float get_progress() const
+ double get_progress() const
{
thread_scoped_lock lock(progress_mutex);
if (total_pixel_samples > 0) {
- return ((float)pixel_samples) / total_pixel_samples;
+ return ((double)pixel_samples) / (double)total_pixel_samples;
}
return 0.0f;
}