[Bf-blender-cvs] [61a8d12] master: Cycles: Tweak to stack allocator used by BVH builder
Sergey Sharybin
noreply at git.blender.org
Mon Apr 4 12:25:37 CEST 2016
Commit: 61a8d12ccdc1469f03e8fa1eee5fddfa4003d69e
Author: Sergey Sharybin
Date: Mon Apr 4 12:23:23 2016 +0200
Branches: master
https://developer.blender.org/rB61a8d12ccdc1469f03e8fa1eee5fddfa4003d69e
Cycles: Tweak to stack allocator used by BVH builder
In some files stack memory was overruning the pre-allocated stack.
Perhaps we should fall-back to a hep-allocated stack so release builds
don't crash in works case but just becoming slower.
===================================================================
M intern/cycles/bvh/bvh_build.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 54ea28a..9f77ea3 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -513,7 +513,7 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& range)
* because re-allocation happens in chunks and size of those chunks we
* can not control.
*/
- typedef StackAllocator<MAX_ITEMS_PER_LEAF * 8, int> LeafStackAllocator;
+ typedef StackAllocator<MAX_ITEMS_PER_LEAF * 16, int> LeafStackAllocator;
vector<int, LeafStackAllocator> p_type[PRIMITIVE_NUM_TOTAL];
vector<int, LeafStackAllocator> p_index[PRIMITIVE_NUM_TOTAL];
More information about the Bf-blender-cvs
mailing list