Blender Git Loki
Git Commits -> Revision 68478ae
Revision 68478ae by Sergey Sharybin (master) June 28, 2015, 16:15 (GMT) |
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. |
Commit Details:
Full Hash: 68478aea016e87e071d550797b36acd32d33bd12
Parent Commit: b506f3d
Lines Changed: +47, -55