[Bf-blender-cvs] [5d50779] master: Cycles; Correction to previous debug print to survive prints from multiple threads

Sergey Sharybin noreply at git.blender.org
Fri Jan 16 12:40:28 CET 2015


Commit: 5d5077957e6652526f6976a043b2cc49980293e8
Author: Sergey Sharybin
Date:   Fri Jan 16 16:34:07 2015 +0500
Branches: master
https://developer.blender.org/rB5d5077957e6652526f6976a043b2cc49980293e8

Cycles; Correction to previous debug print to survive prints from multiple threads

This commit basically makes it so statistics print from different BVH trees are not
being interleaved with each other. Glog ensures this when debug print is done as a
single put to stream operator.

===================================================================

M	intern/cycles/bvh/bvh_build.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index dde8e45..32946c8 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -275,17 +275,14 @@ BVHNode* BVHBuild::run()
 		}
 	}
 
-	VLOG(1) << "BVH built in "
-	        << time_dt() - build_start_time
-	        << " seconds.";
-
-	VLOG(1) << "BVH statistics:";
-	VLOG(1) << "  Total number of nodes: "
-	        << rootnode->getSubtreeSize(BVH_STAT_NODE_COUNT);
-	VLOG(1) << "  Number of inner nodes: "
-	        << rootnode->getSubtreeSize(BVH_STAT_INNER_COUNT);
-	VLOG(1) << "  Number of leaf nodes: "
-	        << rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT);
+	VLOG(1) << "BVH build statistics:\n"
+	        << "  Build time: " << time_dt() - build_start_time << "\n"
+	        << "  Total number of nodes: "
+	        << rootnode->getSubtreeSize(BVH_STAT_NODE_COUNT) << "\n"
+	        << "  Number of inner nodes: "
+	        << rootnode->getSubtreeSize(BVH_STAT_INNER_COUNT)  << "\n"
+	        << "  Number of leaf nodes: "
+	        << rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT)  << "\n";
 
 	return rootnode;
 }




More information about the Bf-blender-cvs mailing list