From ca5271e637cdf75b1739a18a27f86ea7610450b1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 18 Aug 2016 20:47:14 +0200 Subject: [PATCH] Cycles: Fix wrong allocator used for spatial builder --- intern/cycles/bvh/bvh_build.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index 67ffb6853d6..f2a735d12e3 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -713,14 +713,14 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& range, * can not control. */ typedef StackAllocator<256, int> LeafStackAllocator; + typedef StackAllocator<256, BVHReference> LeafReferenceStackAllocator; vector p_type[PRIMITIVE_NUM_TOTAL]; vector p_index[PRIMITIVE_NUM_TOTAL]; vector p_object[PRIMITIVE_NUM_TOTAL]; - vector p_ref[PRIMITIVE_NUM_TOTAL]; + vector p_ref[PRIMITIVE_NUM_TOTAL]; /* TODO(sergey): In theory we should be able to store references. */ - typedef StackAllocator<256, BVHReference> LeafReferenceStackAllocator; vector object_references; uint visibility[PRIMITIVE_NUM_TOTAL] = {0};