Commit: bd921686432af13b568a80defeae3d95ff9f22c8
Author: Thomas Dinges
Date:   Wed Feb 18 01:12:53 2015 +0100
Branches: master
https://developer.blender.org/rBbd921686432af13b568a80defeae3d95ff9f22c8

Cycles / BVH: Remove unused temp copy of prim_object.

This will save some memory during BVH Build.

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

M       intern/cycles/bvh/bvh.cpp
M       intern/cycles/bvh/bvh.h

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

diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 5877550..2e70d61 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 d0b0ebe..40f0395 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to