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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-27 15:47:52 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-27 15:49:37 +0300
commit8f9a6b1bab89b9af821b3996514af7de7c8cce7c (patch)
tree17bd0cbb6b51880b5e85dbc184a22a194dad68b9 /intern
parentbee16ec4d8a19cfaecb95df804e350846148b30c (diff)
Cycles: Cleanup
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/bvh/bvh8.cpp7
-rw-r--r--intern/cycles/kernel/bvh/obvh_traversal.h2
-rw-r--r--intern/cycles/kernel/bvh/qbvh_traversal.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/intern/cycles/bvh/bvh8.cpp b/intern/cycles/bvh/bvh8.cpp
index 8db06c31863..b95fe572e27 100644
--- a/intern/cycles/bvh/bvh8.cpp
+++ b/intern/cycles/bvh/bvh8.cpp
@@ -124,6 +124,7 @@ void BVH8::pack_aligned_node(int idx,
data[0].a = __uint_as_float(visibility & ~PATH_RAY_NODE_UNALIGNED);
data[0].b = time_from;
data[0].c = time_to;
+
for(int i = 0; i < num; i++) {
float3 bb_min = bounds[i].min;
float3 bb_max = bounds[i].max;
@@ -140,8 +141,8 @@ void BVH8::pack_aligned_node(int idx,
for(int i = num; i < 8; i++) {
/* We store BB which would never be recorded as intersection
- * so kernel might safely assume there are always 4 child nodes.
- */
+ * so kernel might safely assume there are always 4 child nodes.
+ */
data[1][i] = FLT_MAX;
data[2][i] = -FLT_MAX;
@@ -153,6 +154,7 @@ void BVH8::pack_aligned_node(int idx,
data[7][i] = __int_as_float(0);
}
+
memcpy(&pack.nodes[idx], data, sizeof(float4)*BVH_ONODE_SIZE);
}
@@ -189,6 +191,7 @@ void BVH8::pack_unaligned_node(int idx,
{
float8 data[BVH_UNALIGNED_ONODE_SIZE];
memset(data, 0, sizeof(data));
+
data[0].a = __uint_as_float(visibility | PATH_RAY_NODE_UNALIGNED);
data[0].b = time_from;
data[0].c = time_to;
diff --git a/intern/cycles/kernel/bvh/obvh_traversal.h b/intern/cycles/kernel/bvh/obvh_traversal.h
index 2021d8e1143..98cd8f000ba 100644
--- a/intern/cycles/kernel/bvh/obvh_traversal.h
+++ b/intern/cycles/kernel/bvh/obvh_traversal.h
@@ -179,7 +179,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
avxf cnodes;
/* TODO(sergey): Investigate whether moving cnodes upwards
* gives a speedup (will be different cache pattern but will
- * avoid extra check here),
+ * avoid extra check here).
*/
#if BVH_FEATURE(BVH_HAIR)
if(__float_as_uint(inodes.x) & PATH_RAY_NODE_UNALIGNED) {
diff --git a/intern/cycles/kernel/bvh/qbvh_traversal.h b/intern/cycles/kernel/bvh/qbvh_traversal.h
index 335a4afd47a..b36689b2a2e 100644
--- a/intern/cycles/kernel/bvh/qbvh_traversal.h
+++ b/intern/cycles/kernel/bvh/qbvh_traversal.h
@@ -188,7 +188,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
float4 cnodes;
/* TODO(sergey): Investigate whether moving cnodes upwards
* gives a speedup (will be different cache pattern but will
- * avoid extra check here),
+ * avoid extra check here).
*/
#if BVH_FEATURE(BVH_HAIR)
if(__float_as_uint(inodes.x) & PATH_RAY_NODE_UNALIGNED) {