blender/intern/cycles/bvh
Sergey Sharybin 68478aea01 Cycles: Avoid having duplication of BVH arrays during build
Previous idea behind having vector during building and array for actual storage
was needed in order to minimize amount of re-allocations happening during the
build, but it lead to double memory overhead used by those arrays at the vector
to array conversion stage.

Issue with such approach was that for BVH without spatial split size of arrays
is known in advance and it never changes, which made vector to array conversion
totally redundant.

Also after testing with several rather complex from spatial split scenes (such
as trees) it seems even conservative approach of reallocation (when we perform
re-allocation when leaf does not fit into the memory) doesn't give measurable
difference in time.

This makes it so we can switch to array, which will avoid unneeded memory
re-allocations when spatial split is disabled without harming other cases.

it's a bit difficult to measure exact benefit of this change on our production
files here, but depending on the scene it might give quite reasonable memory
save.
2015-06-28 18:15:25 +02:00
..
bvh_binning.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
bvh_binning.h Cycles: merging features from tomato branch. 2012-04-28 08:53:59 +00:00
bvh_build.cpp Cycles: Avoid having duplication of BVH arrays during build 2015-06-28 18:15:25 +02:00
bvh_build.h Cycles: Avoid having duplication of BVH arrays during build 2015-06-28 18:15:25 +02:00
bvh_node.cpp Cycles: Use proper node counter to allocate QBVH nodes 2014-12-25 02:50:49 +05:00
bvh_node.h Cleanup: style & const's 2015-05-05 05:19:49 +10:00
bvh_params.h Cycles: Avoid memcpy of intersecting memory 2015-03-20 21:14:50 +05:00
bvh_sort.cpp Cycles code refactor: changes to make adding new primitive types easier. 2014-03-29 13:03:46 +01:00
bvh_sort.h style cleanup: block comments 2012-06-09 17:22:52 +00:00
bvh_split.cpp Cycles: Code cleanup, spaces around keywords 2015-03-28 00:15:15 +05:00
bvh_split.h Cycles: optimization for hair BVH build, allow max 2 hair curves per leaf. 2014-04-22 17:15:41 +02:00
bvh.cpp Cycles: Avoid having duplication of BVH arrays during build 2015-06-28 18:15:25 +02:00
bvh.h Cycles: Split BVH nodes storage into inner and leaf nodes 2015-04-20 17:29:51 +05:00
CMakeLists.txt code cleanup: 2012-10-17 04:13:03 +00:00