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_split.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_split.cpp')
-rw-r--r--intern/cycles/bvh/bvh_split.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh_split.cpp b/intern/cycles/bvh/bvh_split.cpp
index a697c44890f..534c1aa73b5 100644
--- a/intern/cycles/bvh/bvh_split.cpp
+++ b/intern/cycles/bvh/bvh_split.cpp
@@ -300,8 +300,8 @@ void BVHSpatialSplit::split_curve_primitive(const Mesh *mesh,
/* curve split: NOTE - Currently ignores curve width and needs to be fixed.*/
const int k0 = mesh->curves[prim_index].first_key + segment_index;
const int k1 = k0 + 1;
- const float4 key0 = mesh->curve_keys[k0];
- const float4 key1 = mesh->curve_keys[k1];
+ const float4& key0 = mesh->curve_keys[k0];
+ const float4& key1 = mesh->curve_keys[k1];
float3 v0 = float4_to_float3(key0);
float3 v1 = float4_to_float3(key1);