From 2e91bcfb9d5384bf14c5f405998aa8637b0fc918 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 29 Apr 2015 15:29:42 +0500 Subject: [PATCH] Fix T44544: Cached BVH is broken since BVH leaf split Still need to solve issues with reading old cache with new builds. --- intern/cycles/bvh/bvh.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index d1c3feed963..0d9412a5712 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);