Fix T45333: Volume Scatter crash blender

This commit is contained in:
Sergey Sharybin 2015-07-13 18:53:48 +05:00
parent a2f7997e05
commit 9f63cbf4a7
Notes: blender-bot 2023-02-14 12:01:57 +01:00
Referenced by issue #45333, Volume Scatter crash blender
2 changed files with 6 additions and 6 deletions

View File

@ -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));

View File

@ -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));