Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-08-06 02:39:40 +0400
committerThomas Dinges <blender@dingto.org>2014-08-06 02:39:40 +0400
commit2c331302773bfbd725c1a9a102b7e637a46a2a2f (patch)
tree35f57292cdce9bad58b5429a2732186100ccb29c
parent771d2f7a24252942e6dfc0e94ae0a1316a910dbf (diff)
Cycles: Use bool for is_leaf bvh property.
* This is not actually copied to the device, so we can use a bool here, which is smaller than a int.
-rw-r--r--intern/cycles/bvh/bvh.cpp2
-rw-r--r--intern/cycles/bvh/bvh.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 3c0c5c021c8..a2c6733190b 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -497,7 +497,7 @@ void BVH::pack_instances(size_t nodes_size)
size_t nsize_bbox = (use_qbvh)? nsize-2: nsize-1;
int4 *bvh_nodes = &bvh->pack.nodes[0];
size_t bvh_nodes_size = bvh->pack.nodes.size();
- int *bvh_is_leaf = (bvh->pack.is_leaf.size() != 0) ? &bvh->pack.is_leaf[0] : NULL;
+ bool *bvh_is_leaf = (bvh->pack.is_leaf.size() != 0) ? &bvh->pack.is_leaf[0] : NULL;
for(size_t i = 0, j = 0; i < bvh_nodes_size; i+=nsize, j++) {
memcpy(pack_nodes + pack_nodes_offset, bvh_nodes + i, nsize_bbox*sizeof(int4));
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h
index 5fcaaaa988c..97c5ebde2ed 100644
--- a/intern/cycles/bvh/bvh.h
+++ b/intern/cycles/bvh/bvh.h
@@ -63,7 +63,7 @@ struct PackedBVH {
array<int> prim_object;
/* quick array to lookup if a node is a leaf, not used for traversal, only
* for instance BVH merging */
- array<int> is_leaf;
+ array<bool> is_leaf;
/* index of the root node. */
int root_index;