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>2015-08-30 17:47:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-08-30 17:48:16 +0300
commit4ac5859f05892cf1456385fe7de3f13debdca858 (patch)
treec3f7618b0f926ffde8bf506af86874685e948a51 /intern/cycles/bvh/bvh_binning.cpp
parent00d12ec04f83b20f9952bb5780d8fed9e870aac4 (diff)
Cycles: Avoid copying objects in some places of BVH build
Gives barely measurable speedup of Spatial Split BVH build.
Diffstat (limited to 'intern/cycles/bvh/bvh_binning.cpp')
-rw-r--r--intern/cycles/bvh/bvh_binning.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/bvh/bvh_binning.cpp b/intern/cycles/bvh/bvh_binning.cpp
index db96490a36f..8745e39c21e 100644
--- a/intern/cycles/bvh/bvh_binning.cpp
+++ b/intern/cycles/bvh/bvh_binning.cpp
@@ -76,8 +76,8 @@ BVHObjectBinning::BVHObjectBinning(const BVHRange& job, BVHReference *prims)
prefetch_L2(&prims[start() + i + 8]);
/* map even and odd primitive to bin */
- BVHReference prim0 = prims[start() + i + 0];
- BVHReference prim1 = prims[start() + i + 1];
+ const BVHReference& prim0 = prims[start() + i + 0];
+ const BVHReference& prim1 = prims[start() + i + 1];
int4 bin0 = get_bin(prim0.bounds());
int4 bin1 = get_bin(prim1.bounds());
@@ -96,7 +96,7 @@ BVHObjectBinning::BVHObjectBinning(const BVHRange& job, BVHReference *prims)
/* for uneven number of primitives */
if(i < ssize_t(size())) {
/* map primitive to bin */
- BVHReference prim0 = prims[start() + i];
+ const BVHReference& prim0 = prims[start() + i];
int4 bin0 = get_bin(prim0.bounds());
/* increase bounds of bins */