Cycles: code refactoring to deduplicate the various BVH traversal variations.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 17 Apr 2013 20:07:22 +0000 (20:07 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 17 Apr 2013 20:07:22 +0000 (20:07 +0000)
commited1a08382f2b9f9d11661d2f4c68c496c49f274a
tree493b75861ce91041475ff7de0169051e43b455a1
parentf3f5e9553ecf43cbe19d40607ef27e0ea1a73085
Cycles: code refactoring to deduplicate the various BVH traversal variations.
Now there is a single BVH traversal code with #ifdefs for various features.
At runtime it will then select the appropriate variation to use depending if
instancing, hair or motion blur is in use.

This makes scenes without hair render a bit faster, especially after the
minimum width feature was added. It's not the most beautiful code, but we can't
use c++ templates and there were already 4 copies, adding 4 more to handle the
hair case separately would be too much.
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/kernel_bvh.h
intern/cycles/kernel/kernel_bvh_traversal.h [new file with mode: 0644]
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_subsurface.h
intern/cycles/kernel/kernel_types.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h