Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Jun 2018 10:01:09 +0000 (12:01 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Jun 2018 10:01:09 +0000 (12:01 +0200)
intern/cycles/kernel/bvh/bvh.h
intern/cycles/kernel/bvh/bvh_local.h

index c0a5bb434eafdb83368d4534b936adad55e55f24..d3e0b25a20063958611472211ee4f5d170342df6 100644 (file)
@@ -212,21 +212,20 @@ ccl_device_intersect void scene_intersect_local(KernelGlobals *kg,
 {
 #ifdef __OBJECT_MOTION__
        if(kernel_data.bvh.have_motion) {
-               bvh_intersect_local_motion(kg,
-                                          &ray,
-                                          local_isect,
-                                          local_object,
-                                          lcg_state,
-                                          max_hits);
-               return;
+               return bvh_intersect_local_motion(kg,
+                                                 &ray,
+                                                 local_isect,
+                                                 local_object,
+                                                 lcg_state,
+                                                 max_hits);
        }
 #endif /* __OBJECT_MOTION__ */
-       bvh_intersect_local(kg,
-                           &ray,
-                           local_isect,
-                           local_object,
-                           lcg_state,
-                           max_hits);
+       return bvh_intersect_local(kg,
+                                   &ray,
+                                   local_isect,
+                                   local_object,
+                                   lcg_state,
+                                   max_hits);
 }
 #endif
 
index 605d4166819ffbc104a735bb8e6319905572395c..9292cc76a5cc81030e73d04cdf3ba6344bd2f265 100644 (file)
@@ -246,22 +246,20 @@ ccl_device_inline void BVH_FUNCTION_NAME(KernelGlobals *kg,
        switch(kernel_data.bvh.bvh_layout) {
 #ifdef __QBVH__
                case BVH_LAYOUT_BVH4:
-                       BVH_FUNCTION_FULL_NAME(QBVH)(kg,
-                                                    ray,
-                                                    local_isect,
-                                                    local_object,
-                                                    lcg_state,
-                                                    max_hits);
-                       break;
+                       return BVH_FUNCTION_FULL_NAME(QBVH)(kg,
+                                                           ray,
+                                                           local_isect,
+                                                           local_object,
+                                                           lcg_state,
+                                                           max_hits);
 #endif
                case BVH_LAYOUT_BVH2:
-                       BVH_FUNCTION_FULL_NAME(BVH)(kg,
-                                                   ray,
-                                                   local_isect,
-                                                   local_object,
-                                                   lcg_state,
-                                                   max_hits);
-                       break;
+                       return BVH_FUNCTION_FULL_NAME(BVH)(kg,
+                                                          ray,
+                                                          local_isect,
+                                                          local_object,
+                                                          lcg_state,
+                                                          max_hits);
        }
        kernel_assert(!"Should not happen");
 }