[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49931] branches/soc-2011-tomato/intern/ cycles: Fixed incorrect sample counter reported when rendering several render layers

Sergey Sharybin sergey.vfx at gmail.com
Thu Aug 16 10:49:44 CEST 2012


Revision: 49931
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49931
Author:   nazgul
Date:     2012-08-16 08:49:43 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
Fixed incorrect sample counter reported when rendering several render layers

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/cycles/render/session.cpp
    branches/soc-2011-tomato/intern/cycles/util/util_progress.h

Modified: branches/soc-2011-tomato/intern/cycles/render/session.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/session.cpp	2012-08-16 08:36:26 UTC (rev 49930)
+++ branches/soc-2011-tomato/intern/cycles/render/session.cpp	2012-08-16 08:49:43 UTC (rev 49931)
@@ -532,6 +532,9 @@
 
 	/* run */
 	if(!progress.get_cancel()) {
+		/* reset number of rendered samples */
+		progress.reset_sample();
+
 		if(device_use_gl)
 			run_gpu();
 		else

Modified: branches/soc-2011-tomato/intern/cycles/util/util_progress.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/util/util_progress.h	2012-08-16 08:36:26 UTC (rev 49930)
+++ branches/soc-2011-tomato/intern/cycles/util/util_progress.h	2012-08-16 08:49:43 UTC (rev 49931)
@@ -120,6 +120,13 @@
 		tile_time_ = tile_time;
 	}
 
+	void reset_sample()
+	{
+		thread_scoped_lock lock(progress_mutex);
+
+		sample = 0;
+	}
+
 	void increment_sample()
 	{
 		thread_scoped_lock lock(progress_mutex);




More information about the Bf-blender-cvs mailing list