diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-17 21:31:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-25 00:50:49 +0300 |
commit | f4a959f7348f542239962896bc239322ac301bff (patch) | |
tree | 7343ea5271fdfc301b8121e3f3276058aa74deda /intern | |
parent | 8cfac731a5b4aad1bf958ce5ee3b3980dacd2a7d (diff) |
Cycles: Avoid over-allocation in packing BVH instances
This solves quite an over-allocation in BVH instances packing code,
unfortunately, it's not a magic bullet to solve memory bump caused
by the recent QBVH changes.
For that we'll likely need to decouple storage for leaf and inner
nodes. However, it's not really clear for now if it's something
important since that'd still be just a fraction of memory comparing
to all the hi-res textures.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index 05f1f6da214..84b854089d7 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -418,7 +418,7 @@ void BVH::pack_instances(size_t nodes_size) if(mesh_map.find(mesh) == mesh_map.end()) { prim_index_size += bvh->pack.prim_index.size(); tri_woop_size += bvh->pack.tri_woop.size(); - nodes_size += bvh->pack.nodes.size()*nsize; + nodes_size += bvh->pack.nodes.size(); mesh_map[mesh] = 1; } |