diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-26 16:25:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-26 16:29:52 +0400 |
commit | 11310b554ab2f08c9f0d086f5f07694ba7ca9f19 (patch) | |
tree | 7223fb12ea4ec56a61f2f38906644a88889261a8 /intern/cycles | |
parent | 1e3904677c8c66d8e2d29189273a81a6b5a47e38 (diff) |
Cycles: avoid some CUDA performance on scenes without deformation motion blur.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_shadow.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_subsurface.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_traversal.h | 2 | ||||
-rw-r--r-- | intern/cycles/render/object.cpp | 3 |
4 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/kernel/geom/geom_bvh_shadow.h b/intern/cycles/kernel/geom/geom_bvh_shadow.h index 6e981fb7080..be9def02080 100644 --- a/intern/cycles/kernel/geom/geom_bvh_shadow.h +++ b/intern/cycles/kernel/geom/geom_bvh_shadow.h @@ -221,10 +221,12 @@ ccl_device bool BVH_FUNCTION_NAME hit = triangle_intersect(kg, isect_array, P, dir, PATH_RAY_SHADOW, object, primAddr); break; } +#if FEATURE(BVH_MOTION) case PRIMITIVE_MOTION_TRIANGLE: { hit = motion_triangle_intersect(kg, isect_array, P, dir, ray->time, PATH_RAY_SHADOW, object, primAddr); break; } +#endif #if FEATURE(BVH_HAIR) case PRIMITIVE_CURVE: case PRIMITIVE_MOTION_CURVE: { diff --git a/intern/cycles/kernel/geom/geom_bvh_subsurface.h b/intern/cycles/kernel/geom/geom_bvh_subsurface.h index 30fc3d68feb..a19f05dd371 100644 --- a/intern/cycles/kernel/geom/geom_bvh_subsurface.h +++ b/intern/cycles/kernel/geom/geom_bvh_subsurface.h @@ -218,10 +218,12 @@ ccl_device uint BVH_FUNCTION_NAME(KernelGlobals *kg, const Ray *ray, Intersectio triangle_intersect_subsurface(kg, isect_array, P, dir, object, primAddr, isect_t, &num_hits, lcg_state, max_hits); break; } +#if FEATURE(BVH_MOTION) case PRIMITIVE_MOTION_TRIANGLE: { motion_triangle_intersect_subsurface(kg, isect_array, P, dir, ray->time, object, primAddr, isect_t, &num_hits, lcg_state, max_hits); break; } +#endif default: { break; } diff --git a/intern/cycles/kernel/geom/geom_bvh_traversal.h b/intern/cycles/kernel/geom/geom_bvh_traversal.h index 6cb622d384c..e6da9391a46 100644 --- a/intern/cycles/kernel/geom/geom_bvh_traversal.h +++ b/intern/cycles/kernel/geom/geom_bvh_traversal.h @@ -256,10 +256,12 @@ ccl_device bool BVH_FUNCTION_NAME hit = triangle_intersect(kg, isect, P, dir, visibility, object, primAddr); break; } +#if FEATURE(BVH_MOTION) case PRIMITIVE_MOTION_TRIANGLE: { hit = motion_triangle_intersect(kg, isect, P, dir, ray->time, visibility, object, primAddr); break; } +#endif #if FEATURE(BVH_HAIR) case PRIMITIVE_CURVE: case PRIMITIVE_MOTION_CURVE: { diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index dab00eae2df..b58caab5efa 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -321,6 +321,9 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene } #endif + if(mesh->use_motion_blur) + have_motion = true; + /* dupli object coords and motion info */ int totalsteps = mesh->motion_steps; int numsteps = (totalsteps - 1)/2; |