diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-29 17:09:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-29 17:09:59 +0300 |
commit | 31278eb4bcc73f95b5032d65ababf32812074c5c (patch) | |
tree | 5422141293391de231224143fb75dd0144fb78e3 /intern/cycles/bvh/bvh2.cpp | |
parent | e81c352746483acb50fbeddbba4249cdcb51d952 (diff) | |
parent | b2c707747da9f930a05499e98874c35d9aee7193 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/bvh/bvh2.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh2.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/intern/cycles/bvh/bvh2.cpp b/intern/cycles/bvh/bvh2.cpp index 9d89d2b6afb..4a423c16559 100644 --- a/intern/cycles/bvh/bvh2.cpp +++ b/intern/cycles/bvh/bvh2.cpp @@ -25,13 +25,6 @@ CCL_NAMESPACE_BEGIN -static bool node_bvh_is_unaligned(const BVHNode *node) -{ - const BVHNode *node0 = node->get_child(0), - *node1 = node->get_child(1); - return node0->is_unaligned || node1->is_unaligned; -} - BVH2::BVH2(const BVHParams& params_, const vector<Object*>& objects_) : BVH(params_, objects_) { @@ -195,7 +188,7 @@ void BVH2::pack_nodes(const BVHNode *root) } else { stack.push_back(BVHStackEntry(root, nextNodeIdx)); - nextNodeIdx += node_bvh_is_unaligned(root) + nextNodeIdx += node_is_unaligned(root, bvh2) ? BVH_UNALIGNED_NODE_SIZE : BVH_NODE_SIZE; } @@ -218,7 +211,7 @@ void BVH2::pack_nodes(const BVHNode *root) } else { idx[i] = nextNodeIdx; - nextNodeIdx += node_bvh_is_unaligned(e.node->get_child(i)) + nextNodeIdx += node_is_unaligned(e.node->get_child(i), bvh2) ? BVH_UNALIGNED_NODE_SIZE : BVH_NODE_SIZE; } |