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:
authorThomas Dinges <blender@dingto.org>2015-02-18 03:12:53 +0300
committerThomas Dinges <blender@dingto.org>2015-02-18 03:14:59 +0300
commitbd921686432af13b568a80defeae3d95ff9f22c8 (patch)
tree2579a3d33ffb5b6903073a054da0f257e04694bd /intern/cycles/bvh
parent5eecfbd980eb6d48e78e44854efeb98114cf4434 (diff)
Cycles / BVH: Remove unused temp copy of prim_object.
This will save some memory during BVH Build.
Diffstat (limited to 'intern/cycles/bvh')
-rw-r--r--intern/cycles/bvh/bvh.cpp7
-rw-r--r--intern/cycles/bvh/bvh.h6
2 files changed, 6 insertions, 7 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 58775509cfd..2e70d61af30 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -226,8 +226,7 @@ void BVH::build(Progress& progress)
/* pack nodes */
progress.set_substatus("Packing BVH nodes");
- array<int> tmp_prim_object = pack.prim_object;
- pack_nodes(tmp_prim_object, root);
+ pack_nodes(root);
/* free build nodes */
root->deleteSubtree();
@@ -539,7 +538,7 @@ void RegularBVH::pack_node(int idx, const BoundBox& b0, const BoundBox& b1, int
memcpy(&pack.nodes[idx * BVH_NODE_SIZE], data, sizeof(int4)*BVH_NODE_SIZE);
}
-void RegularBVH::pack_nodes(const array<int>& prims, const BVHNode *root)
+void RegularBVH::pack_nodes(const BVHNode *root)
{
size_t node_size = root->getSubtreeSize(BVH_STAT_NODE_COUNT);
@@ -755,7 +754,7 @@ void QBVH::pack_inner(const BVHStackEntry& e, const BVHStackEntry *en, int num)
/* Quad SIMD Nodes */
-void QBVH::pack_nodes(const array<int>& prims, const BVHNode *root)
+void QBVH::pack_nodes(const BVHNode *root)
{
size_t node_size = root->getSubtreeSize(BVH_STAT_QNODE_COUNT);
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h
index d0b0ebe206a..40f039541eb 100644
--- a/intern/cycles/bvh/bvh.h
+++ b/intern/cycles/bvh/bvh.h
@@ -111,7 +111,7 @@ protected:
void pack_instances(size_t nodes_size);
/* for subclasses to implement */
- virtual void pack_nodes(const array<int>& prims, const BVHNode *root) = 0;
+ virtual void pack_nodes(const BVHNode *root) = 0;
virtual void refit_nodes() = 0;
};
@@ -126,7 +126,7 @@ protected:
RegularBVH(const BVHParams& params, const vector<Object*>& objects);
/* pack */
- void pack_nodes(const array<int>& prims, const BVHNode *root);
+ void pack_nodes(const BVHNode *root);
void pack_leaf(const BVHStackEntry& e, const LeafNode *leaf);
void pack_inner(const BVHStackEntry& e, const BVHStackEntry& e0, const BVHStackEntry& e1);
void pack_node(int idx, const BoundBox& b0, const BoundBox& b1, int c0, int c1, uint visibility0, uint visibility1);
@@ -147,7 +147,7 @@ protected:
QBVH(const BVHParams& params, const vector<Object*>& objects);
/* pack */
- void pack_nodes(const array<int>& prims, const BVHNode *root);
+ void pack_nodes(const BVHNode *root);
void pack_leaf(const BVHStackEntry& e, const LeafNode *leaf);
void pack_inner(const BVHStackEntry& e, const BVHStackEntry *en, int num);