diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-13 16:53:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-13 16:54:26 +0300 |
commit | 9f63cbf4a74486f4df030fe8c3fe5fa3952b0910 (patch) | |
tree | 33ac5b9d1eaf834760657c1765da8992f78e36d7 /intern/cycles/kernel/geom | |
parent | a2f7997e0584f4fb08166965df5c73819ce69f69 (diff) |
Fix T45333: Volume Scatter crash blender
Diffstat (limited to 'intern/cycles/kernel/geom')
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_shadow.h | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_volume_all.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/kernel/geom/geom_qbvh_shadow.h b/intern/cycles/kernel/geom/geom_qbvh_shadow.h index f79b2ed9f34..dc37e6ecfa4 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_shadow.h +++ b/intern/cycles/kernel/geom/geom_qbvh_shadow.h @@ -58,6 +58,9 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, Transform ob_tfm; #endif + *num_hits = 0; + isect_array->t = tmax; + #ifndef __KERNEL_SSE41__ if(!isfinite(P.x)) { return false; @@ -68,9 +71,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, int num_hits_in_instance = 0; #endif - *num_hits = 0; - isect_array->t = tmax; - ssef tnear(0.0f), tfar(tmax); sse3f idir4(ssef(idir.x), ssef(idir.y), ssef(idir.z)); diff --git a/intern/cycles/kernel/geom/geom_qbvh_volume_all.h b/intern/cycles/kernel/geom/geom_qbvh_volume_all.h index d5131919944..056ca9a1ad9 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_volume_all.h +++ b/intern/cycles/kernel/geom/geom_qbvh_volume_all.h @@ -60,6 +60,9 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, Transform ob_tfm; #endif + uint num_hits = 0; + isect_array->t = tmax; + #ifndef __KERNEL_SSE41__ if(!isfinite(P.x)) { return false; @@ -70,9 +73,6 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, int num_hits_in_instance = 0; #endif - uint num_hits = 0; - isect_array->t = tmax; - ssef tnear(0.0f), tfar(isect_t); sse3f idir4(ssef(idir.x), ssef(idir.y), ssef(idir.z)); |