Commit: 8bc8713beb8220cdac1475a2f8f99fda8c888b32 Author: Johan Walles Date: Mon Mar 9 16:52:34 2020 +0100 Branches: master https://developer.blender.org/rB8bc8713beb8220cdac1475a2f8f99fda8c888b32
Cleanup: avoid (harmless) race condition reported by Helgrind Differential Revision: https://developer.blender.org/D7058 =================================================================== M intern/cycles/util/util_progress.h =================================================================== diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index 379beaeeefa..23e49b4db7a 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -204,6 +204,8 @@ class Progress { float get_progress() { + thread_scoped_lock lock(progress_mutex); + if (total_pixel_samples > 0) { return ((float)pixel_samples) / total_pixel_samples; } _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
