Commit: 290e6505904592d4e64b490e2c4d3d3822dbea6b
Author: Sergey Sharybin
Date:   Tue Sep 13 10:59:48 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB290e6505904592d4e64b490e2c4d3d3822dbea6b

Fix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render

The issue was caused by some false-positive empty non-AABB intersection.
Tried to tweak it a bit so it does not record intersection anymore.

Hopefully will work for all platforms. Tested here on iMac and Debian.

===================================================================

M       intern/cycles/bvh/bvh.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 09bd03c..7bc9dc3 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -909,9 +909,23 @@ void QBVH::pack_unaligned_inner(const BVHStackEntry& e,
                /* We store BB which would never be recorded as intersection
                 * so kernel might safely assume there are always 4 child nodes.
                 */
-               for(int j = 1; j < 13; ++j) {
-                       data[j][i] = 0.0f;
-               }
+
+               data[1][i] = 1.0f;
+               data[2][i] = 0.0f;
+               data[3][i] = 0.0f;
+
+               data[4][i] = 0.0f;
+               data[5][i] = 0.0f;
+               data[6][i] = 0.0f;
+
+               data[7][i] = 0.0f;
+               data[8][i] = 0.0f;
+               data[9][i] = 0.0f;
+
+               data[10][i] = -FLT_MAX;
+               data[11][i] = -FLT_MAX;
+               data[12][i] = -FLT_MAX;
+
                data[13][i] = __int_as_float(0);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to