From bbbbe68473e02567a902a6405ca09de216674615 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 21 Feb 2016 15:39:02 +0100 Subject: 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. --- intern/cycles/bvh/bvh_build.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'intern/cycles/bvh/bvh_build.h') 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 spatial_right_bounds; - BVHSpatialBin spatial_bins[3][BVHParams::NUM_SPATIAL_BINS]; + vector spatial_storage; /* threads */ TaskPool task_pool; -- cgit v1.2.3