diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-06-05 13:53:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-22 14:06:47 +0300 |
commit | d8c2092b15de61a69bddbc082998a1dc786d73af (patch) | |
tree | b04a183c85b986db1e0d99fbee94be75608afec7 /intern/cycles/bvh/bvh_build.h | |
parent | ace3268482c6bfd9986815aaa6b027c99fa8e3f4 (diff) |
Cycles: make TBB a required library dependency, and use in a few places
Now that the rest of Blender also relies on TBB, no point in maintaining custom
code for paraller_for and thread local storage.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.h')
-rw-r--r-- | intern/cycles/bvh/bvh_build.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h index 3fe4c3799e2..df2aa2ae1a7 100644 --- a/intern/cycles/bvh/bvh_build.h +++ b/intern/cycles/bvh/bvh_build.h @@ -76,7 +76,7 @@ class BVHBuild { BVHNode *build_node(const BVHRange &range, vector<BVHReference> *references, int level, - int thread_id); + BVHSpatialStorage *storage); BVHNode *build_node(const BVHObjectBinning &range, int level); BVHNode *create_leaf_node(const BVHRange &range, const vector<BVHReference> &references); BVHNode *create_object_leaf_nodes(const BVHReference *ref, int start, int num); @@ -87,12 +87,8 @@ class BVHBuild { /* Threads. */ enum { THREAD_TASK_SIZE = 4096 }; void thread_build_node(InnerNode *node, int child, BVHObjectBinning *range, int level); - void thread_build_spatial_split_node(InnerNode *node, - int child, - BVHRange *range, - vector<BVHReference> *references, - int level, - int thread_id); + void thread_build_spatial_split_node( + InnerNode *node, int child, BVHRange *range, vector<BVHReference> *references, int level); thread_mutex build_mutex; /* Progress. */ @@ -127,7 +123,7 @@ class BVHBuild { /* Spatial splitting. */ float spatial_min_overlap; - vector<BVHSpatialStorage> spatial_storage; + enumerable_thread_specific<BVHSpatialStorage> spatial_storage; size_t spatial_free_index; thread_spin_lock spatial_spin_lock; |