Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-05 23:44:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-05 23:44:33 +0400
commit8103381ded923a097eae5a0ba012ae41847a83ad (patch)
treeb2d224fac3262dea4eca154480f26bdd10662c81 /intern/cycles/bvh/bvh_build.h
parentc53fe94bb4973362278b488ef26384a029d3cc69 (diff)
Cycles: threading optimizations
* Multithreaded image loading, each thread can load a separate image. * Better multithreading for multiple instanced meshes, different threads can now build BVH's for different meshes, rather than all cooperating on the same mesh. Especially noticeable for dynamic BVH building for the viewport, gave about 2x faster build on 8 core in fairly complex scene with many objects. * The main thread waiting for worker threads can now also work itself, so (num_cores + 1) threads will be working, this supposedly gives better performance on some operating systems, but did not measure performance for this very detailed yet.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.h')
-rw-r--r--intern/cycles/bvh/bvh_build.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h
index 84e14632b4b..44ef918b326 100644
--- a/intern/cycles/bvh/bvh_build.h
+++ b/intern/cycles/bvh/bvh_build.h
@@ -29,7 +29,9 @@
CCL_NAMESPACE_BEGIN
+class BVHBuildTask;
class BVHParams;
+class InnerNode;
class Mesh;
class Object;
class Progress;
@@ -54,6 +56,7 @@ protected:
friend class BVHMixedSplit;
friend class BVHObjectSplit;
friend class BVHSpatialSplit;
+ friend class BVHBuildTask;
/* adding references */
void add_reference_mesh(BoundBox& root, BoundBox& center, Mesh *mesh, int i);
@@ -68,7 +71,7 @@ protected:
/* threads */
enum { THREAD_TASK_SIZE = 4096 };
- void thread_build_node(Task *task_, int thread_id);
+ void thread_build_node(InnerNode *node, int child, BVHObjectBinning *range, int level);
thread_mutex build_mutex;
/* progress */