[Bf-blender-cvs] [2e91bcf] master: Fix T44544: Cached BVH is broken since BVH leaf split
Sergey Sharybin
noreply at git.blender.org
Wed Apr 29 12:38:50 CEST 2015
Commit: 2e91bcfb9d5384bf14c5f405998aa8637b0fc918
Author: Sergey Sharybin
Date: Wed Apr 29 15:29:42 2015 +0500
Branches: master
https://developer.blender.org/rB2e91bcfb9d5384bf14c5f405998aa8637b0fc918
Fix T44544: Cached BVH is broken since BVH leaf split
Still need to solve issues with reading old cache with new builds.
===================================================================
M intern/cycles/bvh/bvh.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index d1c3fee..0d9412a 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -107,6 +107,7 @@ bool BVH::cache_read(CacheData& key)
if(!(value.read(pack.root_index) &&
value.read(pack.SAH) &&
value.read(pack.nodes) &&
+ value.read(pack.leaf_nodes) &&
value.read(pack.object_node) &&
value.read(pack.tri_woop) &&
value.read(pack.prim_type) &&
@@ -118,6 +119,7 @@ bool BVH::cache_read(CacheData& key)
pack.root_index = 0;
pack.SAH = 0.0f;
pack.nodes.clear();
+ pack.leaf_nodes.clear();
pack.object_node.clear();
pack.tri_woop.clear();
pack.prim_type.clear();
@@ -140,6 +142,7 @@ void BVH::cache_write(CacheData& key)
value.add(pack.SAH);
value.add(pack.nodes);
+ value.add(pack.leaf_nodes);
value.add(pack.object_node);
value.add(pack.tri_woop);
value.add(pack.prim_type);
More information about the Bf-blender-cvs
mailing list