diff options
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_cache.h | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index 500b07f755b..f11b3c4c0bc 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -30,6 +30,7 @@ #include "util_foreach.h" #include "util_map.h" #include "util_progress.h" +#include "util_system.h" #include "util_types.h" CCL_NAMESPACE_BEGIN @@ -71,6 +72,7 @@ BVH *BVH::create(const BVHParams& params, const vector<Object*>& objects) bool BVH::cache_read(CacheData& key) { + key.add(system_cpu_bits()); key.add(¶ms, sizeof(params)); foreach(Object *ob, objects) { diff --git a/intern/cycles/util/util_cache.h b/intern/cycles/util/util_cache.h index e8f111a5397..deff05fff16 100644 --- a/intern/cycles/util/util_cache.h +++ b/intern/cycles/util/util_cache.h @@ -72,7 +72,7 @@ public: buffers.push_back(buffer); } - void add(void *data, size_t size) + void add(const void *data, size_t size) { if(size) { CacheBuffer buffer(data, size); @@ -80,19 +80,19 @@ public: } } - void add(int& data) + void add(const int& data) { CacheBuffer buffer(&data, sizeof(int)); buffers.push_back(buffer); } - void add(float& data) + void add(const float& data) { CacheBuffer buffer(&data, sizeof(float)); buffers.push_back(buffer); } - void add(size_t& data) + void add(const size_t& data) { CacheBuffer buffer(&data, sizeof(size_t)); buffers.push_back(buffer); |