diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-21 17:39:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-31 11:06:21 +0300 |
commit | bbbbe68473e02567a902a6405ca09de216674615 (patch) | |
tree | 0e6dd43ed39c091bfac7001e636612e2136ea202 /intern/cycles/bvh/bvh_build.h | |
parent | 9c420e5e481f00f42eeea42979c140afc8ee4acc (diff) |
Cycles: Wrap spatial split storage into own structure
This has following advantages:
- Localizes all the run-time storage into a single structure,
which could easily be extended further.
- Storage could be created per-thread, so once builder is
threaded we wouldn't have any conflicts between threads.
- Global nature of the storage avoids memory re-allocation
on the runtime, keeping builder as fast as possible.
Currently it's just API changes, which don't affect user at all.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.h')
-rw-r--r-- | intern/cycles/bvh/bvh_build.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h index eefb7b60f7c..5857ae7f038 100644 --- a/intern/cycles/bvh/bvh_build.h +++ b/intern/cycles/bvh/bvh_build.h @@ -114,8 +114,7 @@ protected: /* spatial splitting */ float spatial_min_overlap; - vector<BoundBox> spatial_right_bounds; - BVHSpatialBin spatial_bins[3][BVHParams::NUM_SPATIAL_BINS]; + vector<BVHSpatialStorage> spatial_storage; /* threads */ TaskPool task_pool; |