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.
This commit is contained in:
parent
8cfac731a5
commit
f4a959f734
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user