diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/cycles/bvh/bvh_build.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 3b6c25c370e..efc36f0e6b8 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -153,7 +153,9 @@ set(WITH_CYCLES_DEVICE_MULTI TRUE) if(CYCLES_STANDALONE_REPOSITORY) TEST_UNORDERED_MAP_SUPPORT() endif() -if(HAVE_STD_UNORDERED_MAP_HEADER) +if(WITH_CXX11) + add_definitions(-DCYCLES_STD_UNORDERED_MAP) +elseif(HAVE_STD_UNORDERED_MAP_HEADER) if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE) add_definitions(-DCYCLES_STD_UNORDERED_MAP) else() diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index 63edbc9998f..6af4d25eefc 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -607,8 +607,10 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& range, vector<int, LeafStackAllocator> p_type[PRIMITIVE_NUM_TOTAL]; vector<int, LeafStackAllocator> p_index[PRIMITIVE_NUM_TOTAL]; vector<int, LeafStackAllocator> p_object[PRIMITIVE_NUM_TOTAL]; + /* TODO(sergey): In theory we should be able to store references. */ - vector<BVHReference, LeafStackAllocator> object_references; + typedef StackAllocator<256, BVHReference> LeafReferenceStackAllocator; + vector<BVHReference, LeafReferenceStackAllocator> object_references; uint visibility[PRIMITIVE_NUM_TOTAL] = {0}; /* NOTE: Keep initializtion in sync with actual number of primitives. */ |