Fix T43596: Refraction BSDF crashes blender on pre-sse4 CPU

This is the same issue T43475: SSE4 code is more robust to non-finite values
in the ray origin/direction. So for now added a check before doing BVH traversal
for pre-SSE4 CPUs.

For sure actual root of the issue is a bit different and much more tricky to
solve, especially without disturbing render results too much. Still looking
into this.

In any case, it's kinda fine to have such a check, we might later make it to be
a kernel_assert() instead of just a return.
This commit is contained in:
Sergey Sharybin
2015-02-10 17:31:55 +05:00
parent e7d20b0be4
commit 298d8681a0
5 changed files with 24 additions and 3 deletions

View File

@@ -314,9 +314,6 @@ ccl_device_inline float3 triangle_refine(KernelGlobals *kg,
#ifdef __INTERSECTION_REFINE__
if(isect->object != OBJECT_NONE) {
if(UNLIKELY(t == 0.0f)) {
return P;
}
#ifdef __OBJECT_MOTION__
Transform tfm = sd->ob_itfm;
#else