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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-02-22 18:25:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-03-31 11:06:21 +0300
commitd9b729e342b72bfe31e7932723a149db3b7aa77c (patch)
treecc1de21b2999dea8ad4be41752e030758f280b09 /intern/cycles/bvh/bvh_build.cpp
parentbbbbe68473e02567a902a6405ca09de216674615 (diff)
Cycles: Only sort indices when finding a best dimension to split
This reduces amount of data being moved back and forth, which should have positive effect on the performance.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r--intern/cycles/bvh/bvh_build.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index b83c1e8864b..ce15e1bbc65 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -245,6 +245,8 @@ BVHNode* BVHBuild::run()
foreach(BVHSpatialStorage &storage, spatial_storage) {
storage.spatial_right_bounds.clear();
storage.spatial_right_bounds.resize(num_bins);
+ storage.spatial_indices.clear();
+ storage.spatial_indices.reserve(num_bins);
}
}