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.
This commit is contained in:
Sergey Sharybin 2016-04-04 12:23:23 +02:00
parent 8cc7460495
commit 61a8d12ccd

@ -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];