forked from bartvdbraak/blender
Change some big functions from __device_inline to __device, which
makes CPU kernel compilation much faster when using MSVC. Sideeffect of this change is that CPU rendering is few percent faster now. CUDA rendering is the same speed.
This commit is contained in:
parent
b27854bd47
commit
36f44c6e02
@ -344,7 +344,7 @@ __device_inline void bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
|
||||
}
|
||||
#endif
|
||||
|
||||
__device_inline bool bvh_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
|
||||
__device bool bvh_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
|
||||
{
|
||||
/* traversal stack in CUDA thread-local memory */
|
||||
int traversalStack[BVH_STACK_SIZE];
|
||||
@ -470,7 +470,7 @@ __device_inline bool bvh_intersect(KernelGlobals *kg, const Ray *ray, const uint
|
||||
}
|
||||
|
||||
#ifdef __OBJECT_MOTION__
|
||||
__device_inline bool bvh_intersect_motion(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
|
||||
__device bool bvh_intersect_motion(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
|
||||
{
|
||||
/* traversal stack in CUDA thread-local memory */
|
||||
int traversalStack[BVH_STACK_SIZE];
|
||||
|
@ -53,7 +53,7 @@ __device_noinline void shader_setup_object_transforms(KernelGlobals *kg, ShaderD
|
||||
}
|
||||
#endif
|
||||
|
||||
__device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
|
||||
__device void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
|
||||
const Intersection *isect, const Ray *ray)
|
||||
{
|
||||
#ifdef __INSTANCING__
|
||||
|
Loading…
Reference in New Issue
Block a user