Cycles: Safer fix for infinite recursion
Previous fix wasn't working correct for certain compiler and CPU intrinsics mode, causing quite some crashes. This should be a safer fix, which is closer in behavior to previous release but which should still fix issues with robust curve intersection.
This commit is contained in:
parent
87cc8550e2
commit
fbb4be061c
|
@ -242,21 +242,23 @@ void BVH4::pack_unaligned_node(int idx,
|
|||
* so kernel might safely assume there are always 4 child nodes.
|
||||
*/
|
||||
|
||||
data[1][i] = NAN;
|
||||
data[2][i] = NAN;
|
||||
data[3][i] = NAN;
|
||||
const float inf = FLT_MAX / 1000.0f;
|
||||
|
||||
data[4][i] = NAN;
|
||||
data[5][i] = NAN;
|
||||
data[6][i] = NAN;
|
||||
data[1][i] = inf;
|
||||
data[2][i] = 0.0f;
|
||||
data[3][i] = 0.0f;
|
||||
|
||||
data[7][i] = NAN;
|
||||
data[8][i] = NAN;
|
||||
data[9][i] = NAN;
|
||||
data[4][i] = 0.0f;
|
||||
data[5][i] = inf;
|
||||
data[6][i] = 0.0f;
|
||||
|
||||
data[10][i] = NAN;
|
||||
data[11][i] = NAN;
|
||||
data[12][i] = NAN;
|
||||
data[7][i] = 0.0f;
|
||||
data[8][i] = 0.0f;
|
||||
data[9][i] = inf;
|
||||
|
||||
data[10][i] = -inf;
|
||||
data[11][i] = -inf;
|
||||
data[12][i] = -inf;
|
||||
|
||||
data[13][i] = __int_as_float(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue